Last active
September 19, 2023 02:46
-
-
Save aamsur-mkt/538de2dae7203eeff0e5c1c44d4c8b51 to your computer and use it in GitHub Desktop.
Change ubuntu hostname
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo nano /etc/hosts | |
# add yourfhostname after localhost | |
# example : | |
# 127.0.0.1 localhost yourfhostname | |
# then save | |
$ sudo hostnamectl set-hostname yourfhostname | |
# check the result with: | |
$ hostname | |
# The command should return the new hostname. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment