Change Hostname on Ubuntu

  • Last Created On Dec 09, 2024
  • 11
0 0

In this tutorial, we will assume that the hostname you want is “pluto”.

For Ubuntu 12.04 (Precise Pangolin)

  1. On your SSH Terminal, type: hostname pluto
  2. Using nano, you can then type: nano /etc/hostname
  3. Type in pluto, then press Ctrl + X, then Y, then Enter.
  4. Now, again using nano, type nano /etc/hosts to edit the hosts file.
  5. Add another line on top, it should read: 127.0.0.1 pluto
  6. Confirm your changes by typing hostname.

For Ubuntu 14.04 (Trusty Tahr) / 14.10 (Utopic Unicorn)

  1. Newer Ubuntu versions make it even easier, you can just type: hostnamectl set-hostname pluto
  2. Confirm your changes by typing hostname.
Views: 11

Recent Articles

  • How to Install JAX with ROCm Acceleratio...
    96
  • Deploy a PyTorch Workspace on a Vultr Cl...
    71
  • Managing Backup Storage
    83
  • Automating FTP Backups in Windows Server
    71
  • Automating FTP Backups in Linux
    75

Popular Articles

  • Our General Terms & Conditions
    2632
  • Our Privacy Policy
    2477
  • Our Cookies Policy
    275
  • Our Terms of Use
    152
  • How to Install JAX with ROCm Acceleratio...
    96