• notice
  • Congratulations on the launch of the Sought Tech site

linux-ubuntu view the command to modify the host name

To view the current host name, you can use the uname -n command or the /bin/hostname command to view, for example:

[email protected] :~# uname -n
kermitubuntu
[email protected] :~# /bin/hostname
kermitubuntu
[email protected] :~#
If you want to modify the current host name Just use the new host name /bin/hostname.Execute as follows:

[email protected] :~# /bin/hostname helloworld
[email protected] :~# uname -n
helloworld
[email protected]:~#

--------------------------------------- < /p>

Like WINDOWS, LINUX can also configure hosts to simply use the static query of this machine:

Use the command: vi /etc/hosts

127.0.0.1   ;     localhost
127.0.1.1       ubuntu

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6- loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
The above IP address is available Analyze the designation and set it.

Tags

Technical otaku

Sought technology together

Related Topic

0 Comments

Leave a Reply

+