Administration (General): Difference between revisions
Jump to navigation
Jump to search
(Copy from old) |
mNo edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
:On any running Linux system you can change its hostname with the command ‘hostname‘. | :On any running Linux system you can change its hostname with the command ‘hostname‘. | ||
::'''<code> | ::'''<code>hostname</code>''' without any parameter it will output the current hostname of the system. | ||
::'''<code>hostname | ::'''<code>hostname –f</code>''' will output the fully qualified domain name (or FQDN) of the system. | ||
::'''<code>hostname NEW_NAME</code>''' will set the hostname of the system to NEW_NAME. This is active right away and will remain | ::'''<code>hostname NEW_NAME</code>''' will set the hostname of the system to NEW_NAME. This is active right away and will remain so until the system is rebooted (because at system boot it sets this from some particular file configuration - see bellow how to set this permanently). You will most probably need to exit the current shell in order to see the change in your shell prompt. | ||
[[Category:Tutorials]] | [[Category:Tutorials]] |
Latest revision as of 10:23, 30 January 2013
Hostname
You can change a Slackware box's hostname
by two methods:
1) Edit /etc/HOSTNAME
2) Use the hostname command-
- On any running Linux system you can change its hostname with the command ‘hostname‘.
hostname
without any parameter it will output the current hostname of the system.
hostname –f
will output the fully qualified domain name (or FQDN) of the system.
hostname NEW_NAME
will set the hostname of the system to NEW_NAME. This is active right away and will remain so until the system is rebooted (because at system boot it sets this from some particular file configuration - see bellow how to set this permanently). You will most probably need to exit the current shell in order to see the change in your shell prompt.