You have already read information about the system. Now you will try to change it: give the machine a new name.
Linux has a special account — root. It may do almost anything: change system settings, install software, read other users' files. student is a regular user, with access to their own files and to general information about the system.
To run one command as root, you put sudo in front of it:
The first command prints student, the second root. sudo covers one command: the next line runs as student again. On the training machine sudo does not ask for a password; on a real server it usually asks for yours.
The kernel stores the machine's name. hostname on its own prints that name, and hostname followed by a new name changes it.
Rename the machine
Name the machine web-01. Check the result with hostname.
Goals · 0 of 1
- Name the machine web-01 not done yet