Sunday, August 8, 2021

Change Ubuntu server Hoatname permanently

 Type the hostnamectl command :

sudo hostnamectl set-hostname newNameHere

Delete the old name and setup new name.

Next Edit the /etc/hosts file:

sudo nano /etc/hosts

Replace any occurrence of the existing computer name with your new one.

Reboot the system to changes take effect:

sudo reboot

No comments:

Post a Comment

How to inatall docker on Ubuntu using apt repository

 # Add Docker's official GPG key: sudo apt-get update sudo apt-get install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyring...