ubuntu server设置()-ubuntu
ubuntu server设置()
一、root用户支持ssh
# 修改/etc/ssh/sshd_config配置文件1 #PermitRootLogin prohibit-password
2 PermitRootLogin yes
二、修改用户名密码
# sudo passwd
New password:
Retype new password:
passwd: password updated successfully
# 修改root用户密码
# sudo passwd root
[sudo] password for xxx:
New password:
Retype new password:
passwd: password updated successfully
三、查看Ubuntu版本
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
# cat /etc/issue
Ubuntu 22.04.1 LTS \n \l
# cat /proc/version
Linux version 5.15.0-43-generic (buildd@lcy02-amd64-076) (gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #46-Ubuntu SMP Tue Jul 12 10:30:17 UTC 2022
四、修改网卡配置
# cat /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
ethernets:
enp2s0:
addresses:
- 172.16.5.105/23
# gateway4: 172.16.4.1 // 已弃用
routes:
- to: default
via: 172.16.4.1
nameservers:
addresses:
- 192.168.1.12
# dhcp4: true
version: 2
五、修改vim配置
# 参考
https://www.cnblogs.com/coolYuan/p/10131641.html
————————
一、root用户支持ssh
# 修改/etc/ssh/sshd_config配置文件1 #PermitRootLogin prohibit-password
2 PermitRootLogin yes
二、修改用户名密码
# sudo passwd
New password:
Retype new password:
passwd: password updated successfully
# 修改root用户密码
# sudo passwd root
[sudo] password for xxx:
New password:
Retype new password:
passwd: password updated successfully
三、查看Ubuntu版本
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
# cat /etc/issue
Ubuntu 22.04.1 LTS \n \l
# cat /proc/version
Linux version 5.15.0-43-generic (buildd@lcy02-amd64-076) (gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #46-Ubuntu SMP Tue Jul 12 10:30:17 UTC 2022
四、修改网卡配置
# cat /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
ethernets:
enp2s0:
addresses:
- 172.16.5.105/23
# gateway4: 172.16.4.1 // 已弃用
routes:
- to: default
via: 172.16.4.1
nameservers:
addresses:
- 192.168.1.12
# dhcp4: true
version: 2
五、修改vim配置
# 参考
https://www.cnblogs.com/coolYuan/p/10131641.html