root是linux系统里面的超级用户,localhost是主机命
你可以用hostname更改你自己想要取的主机命 例如hostname ** (这个在下一次启动时失效)
你也可以通过更改配置文件 vi /etc/sysconfig/network(一般情况是在这个目录下面)保存退出即可,这个是永久生效。
[root@server1~]:【用户@主机名】
在安装系统的过程中,每个主机名都未必一样,在过程中可以设置主机名,所以会产生不同的主机名。
在安装后也可以更改主机名。
通过配置文件/etc/sysconfig/network修改。
--------------------------------------------------------
# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=localhost.localdomain
--------------------------------------------------------
通过修改此文件的内容,能够实现永久修改linux的主机名,但是不会立即生效,即有可能不在当前运行时间生效,即在从下次重启后才开始生效,至少是不在当前session生效,需要用户退出以后才生效。通过修改此配置文件,再配合hostname命令,可实现立即永久修改linux的主机名。
linux的命令行缺省提示是:用户名@服务器,你当前的提示符说明你拥有server1的全部权限,即root。
后边的是服务器名
用户@服务器名称
里面的1和1p是section
常见的包括
Sections of the Manual Pages
The manual Sections are traditionally defined as follows:
1 Commands (Programs)
Those commands that can be executed by the user from within a shell.
2 System calls
Those functions which must be performed by the kernel.
3 Library calls
Most of the libc functions.
4 Special files (devices)
Files found in /dev.
5 File formats and conventions
The format for /etc/passwd and other human-readable files.
6 Games
7 Conventions and miscellaneous
Overviews of various topics, conventions and protocols, character set standards, and miscellaneous other things.