Checking/changing hostname

By admin

Some command options:

uname -n
hostname -a
hostname -s
hostname -d
hostname -f
hostname

To change the hostname (in debian/ubuntu ):

1) user hostname command:
sudo hostname NEW_HOSTNAME

2) change in hosts file
sudo vi /etc/hosts

3) use sysctl to change the variable kernel.hostname:
sudo sysctl kernel.hostname=NEW_HOSTNAME



categoriaLinux commentoNo Comments dataJune 11th, 2007

About... admin

This author published 340 posts in this site.

Share

FacebookTwitterEmailWindows LiveTechnoratiDeliciousDiggStumbleponMyspaceLikedin

Leave a comment