求助,deepin怎么修改计算机名!!感谢!!
Tofloor
poster avatar
na66571814
deepin
2019-11-03 22:10
Author
昨天刚到的电脑,由于输入计算机名的时候输错,现在想重新修改一下计算机名,百度了很多方法都不行。从终端里进去了,按照网上的说法在终端里输入,sudo nano /etc/hosts,是有找到原计算机名,然后手动改了,但是终端上现实这个文件已更改,但是我也不知道怎么保存,还是说输入好就会自动保存呢?然后关闭之后重启电脑,计算机名并没有更改成功。本人完全小白一个,求大神们教教。。。到底怎么能!谢谢各位好心人!或者说有没有别的方法可以更改计算机名的也行。使用的是华为13,锐龙版的这个本!!谢谢

Reply Favorite View the author
All Replies
avatar
na66571814
deepin
2019-11-03 22:36
#1
不想沉 啊~~~
Reply View the author
avatar
linux000
deepin
2019-11-03 23:22
#2
sudo hostnamectl --static set-hostname  [你的命名]
Reply View the author
avatar
jelly
deepin
2019-11-03 23:29
#3
你是要这样修改 用户名么?
Reply View the author
avatar
testpassword
deepin
2019-11-03 23:54
#4
修改这个文件 /etc/hostname,改完应该要重启一下才能生效。

至于你说的 /etc/hosts 这个文件里面的计算机名,改不改好像都无所谓。
Reply View the author
avatar
jianguo922
deepin
2019-11-03 23:57
#5
楼上正解
Reply View the author
avatar
heisen
deepin
2019-11-04 00:35
#6
修改 /etc/hostname
Reply View the author
avatar
masterjian
deepin
2019-11-04 05:29
#7
https://bbs.deepin.org/post/184664
修改这个文件 /etc/hostname,改完应该要重启一下才能生效。

至于你说的 /etc/hosts 这个文件里面的计算机 ...

/etc/hosts
也得改,软件开发或者本地安装一些网络应用的时候,你就知道不改的坏处了
Reply View the author
avatar
bigbr
deepin
2019-11-04 16:56
#8
sudo dedit /etc/hostname
Reply View the author
avatar
snsmqing
deepin
2019-11-04 19:20
#9
打开终端,输入 nmtui
移动光标到 set system hostname
输入新机器名
Reply View the author
avatar
esdcdliu
deepin
2020-03-07 19:03
#10
终端@前面的名字怎么修改,哪位大神知道
Reply View the author