• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomepcDuinoLinux ApplicationsChange your pcDuino’s hostname
Previous Next

Change your pcDuino’s hostname

Posted by: Yang , September 11, 2014

Computers have hostnames so that they can be addressed by a human readable name as well as by their IP address. The default hostname for your pcDuino is ubuntu.

You might want to change it if you have more than one pcDuino, or just to make your pcDuino your own. Changing the hostname is very easy. You just need to open two files, /etc/hosts and /etc/hostname, and replace the word ubuntu with your chosen hostname. These files are owned by root, so you need to open them as root. I changed my ubuntu’s hostname to pcDuino.

The contents of /etc/hostname is simply

$ nano /etc/hosts    // change ubuntu to pcDuino
ubuntu

/etc/hosts should look like this:

$ nano /etc/hostname // change ubuntu to pcDuino

127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.1.1 ubuntu

Reboot your pcDuino using this command:

$ sudo reboot

When you open a terminal, the prompt should look like this:

root@pcDuino ~$

2010-01-01-234658_660x464_scrot

Share!
Tweet

Yang

About the author

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors