ubuntu server設定
阿新 • • 發佈:2022-11-29
一、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