Saturday, July 2, 2011

How to change your Hostname in Linux

When first starting on the linux operating system such as Ubuntu, you may be prompted to create a hostname(computer name). Here is how you can change your hostname:

When opening up a terminal, you will see (your username)@(hostname). This is also the name that shows up in DHCP when connected to a network.


Run these commands to change the host name:

sudo sysctl kernel.hostname (new hostname)
or hostname (new hostname)

 For Android (You can ssh into your phone using an app or simply run root adb):
getprop net.hostname (shows you your current name)

 setprop net.hostname (new name)

No comments:

Post a Comment

Please make suggestions :)