Access Systems and Get Support
Learn how to access and interact with Linux systems using both local and remote terminals. This chapter covers essential skills for connecting to RHEL systems via SSH, navigating the command-line interface, and accessing system documentation.
📋 Table of Contents
🎯 Introduction
The ability to access and navigate Linux systems is fundamental to system administration. As a system administrator, you'll need to connect to servers both locally (physical access) and remotely (over a network using SSH). Understanding these access methods and knowing how to find help when needed are critical first steps in your RHCSA journey.
This chapter will equip you with the essential skills to:
- Log in to a Linux system using a virtual console
- Connect to remote systems securely using SSH
- Navigate the Bash shell environment
- Access built-in documentation and help resources
- Understand command syntax and options
Throughout this guide, commands will be shown with example output. You should practice these commands on your own RHEL 9 system to reinforce your learning.
🖥️ Access the Local System
Virtual Consoles
RHEL 9 provides multiple virtual consoles that allow you to have several independent login sessions on a single physical system. By default, six text-based virtual consoles are available.
Switching Between Virtual Consoles
Use the following keyboard shortcuts to switch between virtual consoles:
Ctrl+Alt+F1throughCtrl+Alt+F6- Access text consoles 1-6Ctrl+Alt+F1- Return to graphical desktop (if installed)
Virtual consoles are useful for troubleshooting when the graphical interface becomes unresponsive or when you need multiple simultaneous sessions.
Login Process
When you access a virtual console, you'll see a login prompt:
Red Hat Enterprise Linux 9.3 (Plow)
Kernel 5.14.0-362.el9.x86_64 on an x86_64
localhost login: _
Procedure: Logging In to a Virtual Console
- Press
Ctrl+Alt+F2to switch to virtual console 2 - At the login prompt, type your username and press
Enter - Type your password and press
Enter(password won't be displayed) - After successful login, you'll see the command prompt
[student@localhost ~]$ _
Passwords are case-sensitive. Make sure Caps Lock is off when entering your password.
🔐 Access Remote Systems with SSH
What is SSH?
Secure Shell (SSH) is a cryptographic network protocol that provides a secure channel over an unsecured network. SSH encrypts all traffic, including passwords, to protect against eavesdropping and connection hijacking.
Basic SSH Syntax
ssh username@hostname
Or using IP address:
ssh username@192.168.1.100
SSH Connection Example
[student@workstation ~]$ ssh user@servera.example.com
The authenticity of host 'servera.example.com (192.168.1.10)' can't be established.
ECDSA key fingerprint is SHA256:1A2B3C4D5E6F7G8H9I0J.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'servera.example.com' (ECDSA) to the list of known hosts.
user@servera.example.com's password:
[user@servera ~]$
The first time you connect to a host, SSH will ask you to verify the host's fingerprint. This prevents man-in-the-middle attacks. Type "yes" to continue.
SSH Key-Based Authentication
For better security and convenience, you can use SSH keys instead of passwords. This involves creating a public/private key pair.
Procedure: Setting Up SSH Key Authentication
- Generate an SSH key pair:
ssh-keygen -t rsa -b 4096 - Press Enter to accept the default file location (~/.ssh/id_rsa)
- Optionally enter a passphrase for additional security
- Copy the public key to the remote server:
ssh-copy-id user@servera.example.com - Test the connection (you should not be prompted for a password):
ssh user@servera.example.com
Useful SSH Options
| Option | Description |
|---|---|
-p PORT |
Connect to a specific port |
-v |
Verbose mode (useful for troubleshooting) |
-X |
Enable X11 forwarding for graphical applications |
Exit SSH Session
To disconnect from an SSH session, use one of these methods:
exit
# or
logout
# or press
Ctrl+D
⌨️ Bash Shell Basics
Understanding the Command Prompt
The default Bash prompt shows useful information:
[student@localhost ~]$
Breaking it down:
student- Current usernamelocalhost- Hostname of the system~- Current directory (~ represents home directory)$- Regular user prompt (# for root user)
Basic Command Structure
command [options] [arguments]
Example:
ls -l /etc
ls- Command (list directory contents)-l- Option (long format)/etc- Argument (directory to list)
Essential Bash Shortcuts
| Shortcut | Action |
|---|---|
Tab |
Auto-complete commands and file names |
Ctrl+C |
Cancel current command |
Ctrl+D |
Exit current shell |
Ctrl+A |
Move to beginning of line |
Ctrl+E |
Move to end of line |
↑/↓ |
Browse command history |
Tab completion is one of the most useful features in Bash. Press Tab once to complete, or press it twice to see all possible completions.
📚 Access Documentation
Man Pages
Manual pages (man pages) are the primary source of documentation for Linux commands and system calls.
Basic Usage
man command_name
Example:
man ls
Navigating Man Pages
| Key | Action |
|---|---|
Space |
Scroll down one page |
b |
Scroll up one page |
/pattern |
Search for pattern |
n |
Next search result |
q |
Quit man page |
Man Page Sections
Man pages are organized into sections:
- User commands
- System calls
- Library functions
- Special files (devices)
- File formats
- Games
- Miscellaneous
- System administration commands
To access a specific section:
man 5 passwd # View passwd file format
man 1 passwd # View passwd command
Info Pages
Some commands have more detailed documentation in Info format:
info command_name
--help Option
Most commands support the --help option for quick reference:
ls --help
mkdir --help
Documentation in /usr/share/doc
Additional documentation is often available in:
ls /usr/share/doc/
Use man -k keyword to search for commands related to a keyword.
For example: man -k network
📝 Practice Questions
Question 1: Which keyboard shortcut switches to virtual console 3?
Virtual consoles 1-6 are accessed with Ctrl+Alt+F1 through Ctrl+Alt+F6.
Question 2: What command creates an SSH key pair with 4096-bit RSA encryption?
The -t flag specifies the key type (rsa) and -b specifies the number of bits (4096).
Question 3: Which command displays the manual page for the passwd command?
The man command displays manual pages for commands and system calls.
Question 4: What does the ~ symbol represent in the Bash prompt?
The tilde (~) is a shortcut for the current user's home directory.
Question 5: Which key combination cancels a running command in the terminal?
Ctrl+C sends an interrupt signal to cancel the current command. Ctrl+D exits the shell, and Ctrl+Z suspends a process.