我在 Virtualbox 中安装了 Elementary Os,当我打开终端时,我当前的用户如下所示:
cypher@cypher -Virtualbox:~$
我的问题是,我如何删除文本-Virtualbox
,有办法吗?
答案1
从hostname
手册页中:
SET NAME
When called with one argument or with the --file option, the commands set the host name or the NIS/YP domain name. hostname uses the sethostname(2) function, while all of the three domainname, ypdomainname and nisdomainname
use setdomainname(2). Note, that this is effective only until the next reboot. Edit /etc/hostname for permanent change.
Note, that only the super-user can change the names.
It is not possible to set the FQDN or the DNS domain name with the dnsdomainname command (see THE FQDN below).
The host name is usually set once at system startup in /etc/init.d/hostname.sh (normally by reading the contents of a file which contains the host name, e.g. /etc/hostname).
所以我会尝试
sudo nano /etc/hostname
然后将其更改为您喜欢的内容,然后重新启动。