Changing the Hostname in Ubuntu 20.04 and Debian 11
The following tutorial describes how to change the hostname on Ubuntu systems 20.04 and Debian 11.
The whole thing can be done in several ways using the terminal. Both for Debian and Ubuntu the process looks the same.
We start the terminal and, depending on the method chosen by us, we issue the command:
1.
1 | sudo hostnamectl set-hostname naszhostname.pl |
2.
1 | hostname naszhostname.pl |
3.
1 | nmcli general hostname naszhostname.pl |
4.
1 | sudo sysctl kernel.hostname=naszhostname.pl |
5.
1 | echo "naszhostname.pl" >/etc/hostname |
All commands have the same effect.
In order for the changes to be visible, the server must be restarted.
Related entries:
PHP Installation 8 Debian 11
Reset WordPress admin password via WP-CLI
Instant recording desktop in Ubuntu using the built-in recorder
Nextcloud problem MySQL is used as a database, but does not support 4-byte characters
gconf-service gconf-service-backend gconf2-common libappindicator1 libc++1 libc++1-9 libc++abi1-9 libdbusmenu-gtk4 libgail-common libgail18 libgconf-2-4 libgtk2.0-0 libgtk2.0-bin libgtk2.0-commonAll-in-one voice and text chat for gamers
All-in-one voice and text chat for gamers that's free 22.04