• 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

Downlaod Ubuntu 26.10 Stonking Stingray

How To Shutdown Linux With A 15 Minute Delay And Message

Using Linux Terminal How To Get Total Disk Size In GB

Count And Find Number Of Files In A Linux Directory Using Command

Check How Many Users Are Created In Linux Ubuntu

How To Check User Permissions In Linux Using Command

Check Which Folder Is Taking More Space In Ubuntu Linux

How to Install Claude Desktop App in Ubuntu Linux

Job Scheduling Using At Command In Linux With Examples

How To Check Permissions Of A Directory In Linux Command

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

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