How to change hostname in ubuntu linux
How to change hostname in ubuntu linux
in the following steps i will show you how to change hostname in ubuntu linux.
Hostname is nothing but you are giving a name to your system Or hostname is basically a label that assigned to a device,computer or server. With this name you can uniquely identify the system on a network. Hostname points to ip address which is the numerical address or location of the system.
How to check hostname in ubuntu linux
There are different ways to check hostname here are the list of commands
- hostname
- hostnamectl
- cat /etc/hostname
- cat /etc/hosts
run above coomands to see your hostname.
here my hostname is virtualbox
How to change hostname in ubuntu linux permanently
Already I have a hostname as virtualbox now I will change it sckenz.com permanently
The first command is
hostnamectl set-hostname <new hostname>
iam changing to sckenz.com so i written sckenz.com
hostnamectl set-hostname sckenz.com |
Hostnamectl is a command is used to change hostname
Now edit /etc/hosts file
vi /etc/hosts |
in the place of virtualbox write sckenz.com
And save it now your hostname is permannetly changed
You can check by opening new terminal
If you want to revert it back just do same as above with previous hostname
Hostnamectl set-hostname virtualbox
Vi /etc/hosts
write virtualbox and save it
- change hostname in ubuntu
- hostname in linux
- change hostname in linux
- change hostname in ubuntu 16.04
- hostname change in ubuntu 16.04 permanently
- change computer name in ubuntu 16
- change computer name in ubuntu 18.04
- how to change computer name in ubuntu terminal
- change computer name in ubuntu 17.04
- how to change hostname in ubuntu 16.04 permanently
- hostname change in ubuntu 18.04
- how to change hostname in ubuntu 14.04 without restart
- ubuntu host name change
- linux hostname change