Linux Labs

First steps / Stage 1 of 15

Understanding Linux and your terminal

Not running Starting usually ~20 s
Leave the lesson

Step 7 of 8 · on a machine · 4 min

Regular user and root

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:

bash
whoami
sudo whoami

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.

Exercise · do it

Rename the machine

Name the machine web-01. Check the result with hostname.

Sign in and start The machine is available after signing in

Goals · 0 of 1

  • Name the machine web-01 not done yet

Step goals

0 of 1
  • Name the machine web-01 — not done yet
Ubuntu 24.04

Step goals

0 of 1
  • Name the machine web-01 — not done yet
Loading…