Linux Network - other common network commands
Abstract: This paper studied the commands related to network operations is often used in Linux.
hostname command
hostname command is used to display the host name and system settings, set to take effect is only temporary, permanent need to change the configuration file.
The basic syntax
Modify the host name:
1 hostname hostname
View System Information:
1 hostname [options]
Option Description
. 1 - A: display host alias. 2 - d: Displays the DNS domain name. 3 - f: display FQDN name. . 4 - I: Display ip address of the host. . 5 - S: short displays the host name, a truncation at the first point. 6 -y: display the NIS domain name.
Example of use
1 [root@localhost ~]# hostname 2 localhost.localdomain 3 [root@localhost ~]# hostname -a 4 localhost.localdomain localhost4 localhost4.localdomain4 localhost.localdomain localhost6 localhost6.localdomain6 5 [root@localhost ~]#