📌  相关文章
📜  如何在 ubuntu 中更改主机名 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:44.357000             🧑  作者: Mango

代码示例3
# -l changes login name
# -d changes home directory
# -m copies over contents from old home directory
usermod -l  -d /home/ -m 

# NOTE: will not work if you are currently logged on as user
# - workaround by temporarily enabling root account and running above command there
# [sudo passwd root] 
# - after root account has been used to change username lock it using
# [sudo passwd -l root]