• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / How To / How To Change Hostname In Ubuntu Without Reboot

How To Change Hostname In Ubuntu Without Reboot

By Sourabh / June 2, 2023 Category: How To, Ubuntu

Learn how to change hostname in Ubuntu without reboot. Ubuntu users can change hostname via command line using hostname command.

Change Hostname Ubuntu Without Reboot via Commandline

Before you start to change the hostname, run the following command to check the current hostname of our system.

$ hostname

The ‘hostname’ command prints the name of the current host system (with no arguments).

You must also know about the ‘hostid’ command. The ‘hostid’ prints the numeric identifier of the current host in hexadecimal format.

When you run the commands with one argument, it sets the current host name to the specified string. (see below)

Now that we know the current hostname, you can change it using the hostname command. The sytnax of the command is “hostname NEW_HOSTNAME”.

To change the hostname to “SourceDigit”, run the following command:

$ sudo hostname SourceDigit

Using the above command you can change and set the new hostname as “SourceDigit”.

To change hostname using GUI, click settings, under setting window you can see the option labeled “Device Name” which shows the current hostname. Click this, erase the name and type your new hostname and press “Rename” button.

Run the hostname command to make sure that the changes are made correctly and the hostname is changed.

Primary Sidebar

Latest Posts

Ubuntu 25.04 ‘Plucky Puffin’ Is Available To Download

How to Login as Root User in Linux Terminal

Install Firefox In Ubuntu Terminal Command Line

How To Check Kernel Installed Date In Linux Ubuntu

How To List All Kernel Modules That Are Loaded In Ubuntu

Enable Ubuntu Auto Login Without Password

Download Ubuntu 25.04 Official Default Wallpapers

How To Fix Initramfs Error In Ubuntu Command Line

How To Check All Available Kernel Version In Linux Ubuntu

3 Best Artificial Intelligence Domain Name Generators

© 2025 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap