- 系统安装
ubuntu 18.04 英文版,创建个人用户 - 初始系统
a.修改ip
shell> vim /etc/network/interfaces
auto ens33
iface ens33 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 202.96.128.86 8.8.8.8b. 修改dns
shell> sed -i ‘#namserver#i#namserver 202.96.168.86‘ /etc/resolv.conf (临时修改,重启后清空!)
以下为永久更改DNS
shell> vim /etc/resolvconf/resolv.conf.d/base
nameserver 202.96.128.86
nameserver 8.8.8.8
shell> sudo apt-get resolvconf
shell> sudo resolvconf -u - 启用超级管理员 root
shell> sudo passwd root
shell> sudo vim /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
greeter-show-manual-login = true
all-guest = false
修改/etc/pam.d/gdm-autologin 文件,注释掉(auth required pam_succeed_if.so user != root quiet_success)
再修改/etc/pam.d/gdm-password 文件,注释掉(auth required pam_succeed_if.so user != root quiet_success)
修改/root/.profile文件
最后一行 mesg n || true 前添加 tty -s && 即 tty -s &&mesg n || true - 开启root用户ssh远程
shell> sudo apt-get install openssh-server
修改远程配置文件/etc/ssh/sshd_config
PermitRootLogin yes
shell > sudo systemctl restart sshd - 安装必备软件
sudo apt-get vim net-tools resolvconf systat - 更新
apt update ---只检查已安装的软件包是否有可用的更新,不更新;
apt upgrade ---更新已安装的软件包 - 修改主机名
hostnamectl set-hostname ali-sz-xh-172-16-1-59
原文地址:https://www.cnblogs.com/Jack1023/p/10733494.html
时间: 2024-10-04 21:02:58