Category Archives: Linux

Ubuntu 18.04 设定静态 IP 地址

By | 24 11 月, 2019

新建并编辑 /etc/netplan/01-netcfg.yaml文件:

network:
  version: 2
  renderer: networkd
  ethernets:
    ens33:
      dhcp4: no
      addresses: [192.168.50.124/24]
      gateway4: 192.168.50.1
      nameservers:
        addresses: [114.114.114.114]

重启即可。

Ubuntu 18.04 阿里云软件源

By | 24 11 月, 2019
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates

Ubuntu 18.04 开启 root ssh 登录

By | 24 11 月, 2019

修改 root 密码

$ sudo passwd root
[sudo] password for linuxconfig:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

允许 root 登录

$ sudo sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/'