Bookmark this page

Chapter 2.  Accessing a Linux System

Abstract

Goal

Interact with the GNOME desktop, and query the terminal environment.

Sections
  • Log in to a Local Linux System (and Guided Exercise)

  • Using the Command Line (and Guided Exercise)

Lab
  • Accessing a Linux System

Log in to a Local Linux System

Objectives

  • Log in to a Linux system by using the GNOME desktop manager (GDM) and a text-based console.

The Multiuser Linux System

The Linux operating system is designed to support multiple concurrent users. Each person using the computer can have a personal account on the system. After you log in, you can create and save data in your own home directory, which is separate from any other user. Instead of sharing login credentials, each user owns a unique login account. This practice provides privacy to each user and protects your data from being accidentally deleted or changed by other users.

This principle also applies for system data and configuration. You have full control over your own login environment, but unless you are an administrator, you cannot make system changes. Linux is a robust multiuser operating system because it separates the role of a user from the role of an administrator and compartmentalizes users from one another.

The Administrative Account

The root user is the initial account on a Linux system. This user is also known as the super user or administrator.

The root user is not intended for regular use, because it does not have restrictions on modifying or even deleting critical system configuration. For this reason, many distributions do not set a password for the root user, effectively locking the account.

During the Linux system installation, a normal user account is created for each new user. These normal user accounts are also called unprivileged or standard accounts because their level of access is limited. These unprivileged accounts are allowed to change personal settings but system-wide modifications are restricted. However, standard users can be given access to privilege escalation tools to allow them to make certain changes that normally only the root user can perform.

Important

Even if you have the password for the root user, you should avoid using the account. Using this account can increase the chance that it could be compromised.

Logging in to a Linux System

Over the years, Linux has developed different environments for interacting with the system. As a result, there are also different methods for logging in. For example, a personal workstation uses a graphical environment, but a cloud computer might use only a text interface.

Learning different ways to log in to Linux is helpful because Linux systems are widely available in modern computing, and use various environments for interacting with the system.

The Linux Console

A console is a display device to which a Linux system prints messages and a user can input text. The console is the default environment if the system does not have a graphical environment installed.

When the system finishes booting up, the console provides a text interface that requests a username and a password. The interaction with a console is limited because the console requires a display device, but you cannot run graphical applications. You can only interact with the console by providing text input.

Figure 2.1: Linux console prompt

Using a console might also require additional software and configuration when working with a remote system. For example, the classroom lab environment for this course uses virtual machines (VMs) that you access over a Virtual Network Computing (VNC) connection. VNC is a screen sharing software that is used to remotely control systems. The VNC connection to the classroom allows you to access the Linux console.

When using VNC, there is a slight delay on the typing and mouse movement because you are not interacting physically with the operating system. This behavior is one reason that many systems administrators prefer to log in to Linux computers using a minimal text-only interface. When working with remote systems, using a text-only interface is faster because there is less data sent back and forth.

The GNOME Graphical Desktop Environment

Linux also offers a graphical interface to interact with the system. Linux uses GNOME to provide a graphical environment to users. GNOME is an open source desktop environment designed for Linux and other Unix-like operating systems. GNOME follows the same conventions of other operating systems that use a windowing system.

After a Linux computer that has a graphical desktop environment installed boots up, it displays a login screen. This is the GNOME Display Manager (GDM), a system service that handles user logins and authentication.

Note

Not all Linux systems include a graphical environment. Most Linux systems that are used as servers reduce the software and tools that are installed (including graphical environments) to optimize the computer resources. However, Linux workstations have a graphical environment installed by default.

If there are multiple user accounts on the computer, then select your user identity and enter your password. If yours is the only user account on the system, then GDM shows your account. Click the account name, enter your password, and press Enter to authenticate.

After you login, you are presented with a desktop session. This desktop is unique to Linux, but it follows the same conventions found in most other operating systems. There are applications to navigate the Internet, to view your files and directories (or folders), to install software, and so on.

Figure 2.2: GNOME desktop

Unlike other desktop environments, the GNOME desktop starts in a dashboard view. This view exposes the three main components of the graphical environment:

  • In the upper left corner, the Activities Overview organizes windows and starts applications. You can toggle between the dashboard view and the desktop view by clicking Activities, or by pressing the Super key.

  • In the upper right corner, the System Menu provides access to common settings, including your network, audio volume, Bluetooth controls, and a menu to log out.

  • At the bottom of the screen, the Taskbar (also known as the dash panel) contains common application launchers. Click the grid icon to see all the applications that are installed on the system.

The Web-based Administration Console

In Linux, a best practice is to limit the access of a user to only the required resources to complete a task. Similarly, there might be scenarios where access to a machine is limited for security reasons. However, HTTP communication is often enabled and widely available.

In these scenarios, you can use the web-based administration console called Cockpit. Cockpit is an administration tool with modules to interact with the underlying system. Cockpit is sponsored by Red Hat and is installed by default in many Linux distributions.

Cockpit uses existing user accounts to authenticate and creates a session as the logged user. If you log in as an unprivileged user or your user does not have escalation privileges, then some tasks are restricted, but you can view system information, update your password, install applications, and so on.

To log in to Cockpit, open a web browser and navigate to the https://localhost:9090 website. The localhost string instructs the web browser to search for the service in the local machine, and the :9090 string instructs the web browser to search for the service in the 9090 port.

Note

The Cockpit service might not be started when the system boots up. Consult the reference section for more information about the Cockpit service.

The browser displays a certificate warning because Cockpit uses a self-signed certificate. Confirm the security exception and authenticate by using your user and password.

Figure 2.3: Cockpit dashboard

After logging in, Cockpit displays a dashboard with system information.

References

For more information about GNOME, refer to the GNOME official site at https://www.gnome.org

For more information about Cockpit, refer to An Introduction to Cockpit, a Browser-based Administration Tool for Linux at https://learn.spidernet.pl/sysadmin/intro-cockpit

Revision: rh104-9.1-3d1f2bc