ubuntu操作系统总结
网络部署
root@master:~# vim /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto ens33
iface ens33 inet static
address 10.0.0.88
netmask 255.255.255.0
gateway 10.0.0.2
永久设置DNS
root@master:~# cat /etc/systemd/resolved.conf
[Resolve]
DNS=8.8.8.8
#FallbackDNS=
#Domains=
#LLMNR=no
#MulticastDNS=no
#DNSSEC=no
#Cache=yes
#DNSStubListener=yes
把DNS注释取消
开机使用root用户登录
开机用普通用户登录sudo -i 切换到root用户
1,vim /etc/pam.d/gdm-autologin

2,vi /etc/pam.d/gdm-password

3,vim /root/.profile

4, vim /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf

5,修改root用户密码
root@master:~# passwd root
输入新的 UNIX 密码:
6,重启reboot



设置root用户远程登录
1,安装openssh
apt-get install -y openssh-server
ps -ef |grep sshd
2,开启root用户远程登录
vim /etc/sshd_config

找到并用#注释掉这行:PermitRootLogin prohibit-password
添加:PermitRootLogin yes
3,重启ssh服务
systemctl restart sshd
网友评论