Sub topic 6
First Boot and First Login
Assume you know how to run basic shell commands and can access the machine through a local console, virtual-machine console, or cloud provider console. This chapter uses a systemd-based Linux distribution. Systemd is the service manager that starts the system and supervises background services.
Start the installed system
Remove the installation media, then restart the machine. The bootloader should load the installed disk. A successful boot normally ends at one of these interfaces:
- A text login prompt on a server without a graphical desktop.
- A local terminal on a virtual machine.
- A serial or web console provided by a cloud platform.
Sign in with the account created during installation. If the installer created only a root account, use root temporarily and create a normal administrative account in the next setup step. Avoid using root for routine work because every command has unrestricted access.
After signing in, confirm which account and system you reached:
whoami
id
hostname
hostnamectlwhoami prints the current username. id shows the user and group identities used for permission checks. hostnamectl displays the machine's hostname and operating-system details.
Inspect the first boot
A first boot can expose configuration problems before you add services. Check the system state and recent boot messages:
systemctl is-system-running
systemctl --failed
journalctl -b -p warningsystemctl is-system-running commonly prints running. A result such as degraded means at least one unit, which is a systemd-managed service or target, failed. Review systemctl --failed before deciding whether the failure matters.
The -b option limits the journal to the current boot. The -p warning option shows warnings and more serious messages. Some warnings are harmless, but repeated storage, network, or authentication errors need investigation.
Confirm that the machine has the expected network address:
ip -br addr
ip routeAn address such as 192.0.2.10/24 identifies an interface on a network. The default route tells the kernel where to send traffic outside the local network. Do not assume that an address proves Internet access. Test name resolution separately when appropriate:
getent hosts example.comRecord the baseline
Write down the hostname, assigned addresses, distribution release, and console or cloud login method. This baseline helps you recognize changes after updates and configuration work.
flowchart TD
A[Boot installed disk] --> B[Log in through console]
B --> C[Confirm user and hostname]
C --> D[Inspect failed units and boot journal]
D --> E[Check addresses and routes]
E --> F[Record the baseline]The next steps bring the package set up to date, create a dedicated administrative user, and prepare safer remote access.
Exercise
Which command shows whether a systemd-managed unit failed during the current boot?
Show answer
systemctl --failed