Kategorie: Linux

Change the computer name in Linux (Hostname)

Below instant tutorial on how we can change the computer name in Linux (Hostname) In Debian systems, Ubuntu, The CentOS is literally 2 minutes.

Checking the current name of the server you can be done using the command:

hostname

or:

hostname -f

Edit your nano /etc/hosts

 nano /etc/hosts

The file should look like this:

127.0.0.1       localhost.localdomain   localhost
185.38.250.250   node.serwerweb.pl     node

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

the next step is to edit the file nano / etc / hostname

nano /etc/hostname 

And we enter the hostname node

We make a server restart.
When you log into the console, we can verify all the commands:

hostname
hostname -f
root@node:/tmp# hostname
node
root@node:/tmp# hostname -f
node.serwerweb.pl

for systems CentOS issue the command:

hostnamectl set-hostname our new hostname

I also make a server restart.

In case of Ubuntu We use the same principle as a means for Centos

hostnamectl set-hostname our new hostname

Linux

Udostępnij
Opublikowane przez
Linux

Recent posts

KeePass2 2.52 w Ubuntu 22.04

The guide below describes how to install KeePass on Ubuntu. Całość wykonamy za pomocą kilku poleceń

2 years temu

Installing Master PDF editor in Ubuntu 22.04

Master PDF Editor is a comprehensive PDF program, which includes many features. Oprócz tworzenia i edycji

2 years temu

iotop - memory monitoring

Iotop jest prostym narzędziem dla systemów Uniksowych umożliwiającym monitorowanie użycia dowolnego nośnika pamięci flash/hdd/ssd w

2 years temu

Run multiple commands in one cron job

You can separate two or more commands with semicolons (;), Semicolon (;): służy do oddzielania

2 years temu

Changing the exif data of a photo in the Linux terminal

Poniższy poradnik opisuje w jaki sposób za pomocą konsoli możemy dokonać edycji danych zdjęcia exif.

2 years temu

Installing Rocket.Chat Server on Rocky Linux 8

The following guide describes how to install Rocket.Chat on Rocky Linux 8 Całość bardzo prosto zainstalujemy

2 years temu