Here are the steps to complete the lab exercises for Chapter 1:
1. View the locale settings for your system:
localectl status
2. List the locales available for the English language:
localectl list-locales | grep en
3. Set the locale language to "en_US.utf8":
localectl set-locale LANG=en_US.utf8
4. Verify the locale settings:
localectl status
SQL Database Design For Developers at php[tek] 2024
Linux System Admin Guide
1. Linux System Administrator's Guide
Deployment, Configuration and Administration of Linux
Jaromfr Hradflek Douglas Silas Martin Prpic
Stephen Wadeley Tomas Capek Petr Kovar
Miroslav Svoboda Petr Bokoc Peter Ondrejka
Eliska Slobodova Eva Kopalova John Ha
David O'Brien Michael Hideo Don Domingo
2. Linux System Administrator's Guide
Linux System Administrator's Guide
Deployment, Configuration and Administration of Linux
Jaromfr Hradflek
Red Hat Engineering Content Services
jhradilek@redhat.com
Douglas Silas
Red Hat Engineering Content Services
silas@redhat.com
Martin Prpic
Red Hat Engineering Content Services
mprpic@redhat.com
Stephen Wadeley
Red Hat Engineering Content Services
swadeley@redhat.com
Tomas Capek
Red Hat Engineering Content Services
tcapek@redhat.com
Petr Kovar
Red Hat Engineering Content Services
pkovar@redhat.com
Miroslav Svoboda
Red Hat Engineering Content Services
msvoboda@redhat.com
Petr Bokoc
Red Hat Engineering Content Services
pbokoc@redhat.com
Peter Ondrejka
Red Hat Engineering Content Services
pondrejk@redhat.com
Eliska Slobodova
Red Hat Engineering Content Services
eslobodo@redhat.com
Eva Kopalova
Red Hat Engineering Content Services
John Ha
Red Hat Engineering Content Services
3. Linux System Administrator's Guide
David O'Brien
Red Hat Engineering Content Services
Michael Hideo
Red Hat Engineering Content Services
Don Domingo
Red Hat Engineering Content Services
5. Linux System Administrator's Guide
Abstract
The System Administrator's Guide documents relevant information regarding the deployment,
configuration and administration of Linux. It is oriented towards system administrators with a
basic understanding of the system.
6. Linux System Administrator's Guide Table of Contents
Table of Contents
Part I. Basic System Configuration.................................................................................................................................................8
Chapter 1. System Locale and Keyboard Configuration................................................................................................................8
1.1. Setting the System Locale....................................................................................................................................................8
1.1.1. Displaying the Current Status......................................................................................................................................9
1.1.2. Listing Available Locales..............................................................................................................................................9
1.1.3. Setting the Locale.........................................................................................................................................................9
1.2. Changing the Keyboard Layout.........................................................................................................................................10
1.2.1. Displaying the Current Settings.................................................................................................................................10
1.2.2. Listing Available Keymaps.........................................................................................................................................10
1.2.3. Setting the Keymap.....................................................................................................................................................11
1.3. Additional Resources.........................................................................................................................................................13
Installed Documentation.......................................................................................................................................................13
Chapter 1 Lab Exercises...........................................................................................................................................................14
Chapter 1 Lab Solutions...........................................................................................................................................................15
Chapter 2. Configuring the Date and Time...................................................................................................................................16
2.1. Using the timedatectl Command........................................................................................................................................16
2.1.1. Displaying the Current Date and Time.......................................................................................................................16
2.1.2. Changing the Current Date.........................................................................................................................................17
2.1.3. Changing the Current Time.........................................................................................................................................17
2.1.4 . Changing the Time Zone............................................................................................................................................18
2.1.5. Synchronizing the System Clock with a Remote Server............................................................................................18
2.2. Using the date Command...................................................................................................................................................19
2.2.1. Displaying the Current Date and Time.......................................................................................................................19
2.2.2. Changing the Current Date.........................................................................................................................................20
2.2.3. Changing the Current Time.........................................................................................................................................20
2.3. Using the hwclock Command............................................................................................................................................21
2.3.1. Displaying the Current Date and Time......................................................................................................................21
2.3.2. Setting and Synchronizing the Date and Time............................................................................................................22
2.4. Additional Resources.........................................................................................................................................................23
Chapter 2 Lab Exercises...........................................................................................................................................................25
Chapter 2 Lab Solutions...........................................................................................................................................................26
Chapter 3. Managing Users and Groups.......................................................................................................................................28
3.1. Introduction to Users and Groups......................................................................................................................................28
3.1.1. User Private Groups....................................................................................................................................................28
3.1.2. Shadow Passwords......................................................................................................................................................28
3.2. Using the User Manager Tool............................................................................................................................................29
3.2.1. Viewing Users and Groups.........................................................................................................................................29
3.3. Using Command Line Tools..............................................................................................................................................29
3.3.1. Adding a New User.....................................................................................................................................................29
3.3.2. Adding a New Group..................................................................................................................................................32
3.3.3. Creating Group Directories.........................................................................................................................................33
3.4. Additional Resources.........................................................................................................................................................33
Installed Documentation.......................................................................................................................................................33
7. Linux System Administrator's Guide Table of Contents
Chapter 3 Lab Exercises...........................................................................................................................................................35
Chapter 3 Lab Solutions...........................................................................................................................................................36
Chapter 4. Gaining Privileges.......................................................................................................................................................38
4.1. The su Command...............................................................................................................................................................38
4.2. The sudo Command...........................................................................................................................................................39
4.3. Additional Resources.........................................................................................................................................................40
Installed Documentation.......................................................................................................................................................41
Chapter 4 Lab Exercises...........................................................................................................................................................42
Chapter 4 Lab Solutions...........................................................................................................................................................43
Part II. Package Management.......................................................................................................................................................44
Chapter 5. Yum.............................................................................................................................................................................44
5.1. Checking For and Updating Packages...............................................................................................................................44
5.1.1. Checking For Updates................................................................................................................................................45
5.1.2. Updating Packages......................................................................................................................................................46
5.1.3. Preserving Configuration File Changes......................................................................................................................48
5.2. Working with Packages......................................................................................................................................................48
5.2.1. Searching Packages.....................................................................................................................................................48
5.2.2. Listing Packages.........................................................................................................................................................49
5.2.3. Displaying Package Information................................................................................................................................51
5.5.4. Viewing the Current Configuration............................................................................................................................76
5.5.5. Adding, Enabling, and Disabling a Yum Repository..................................................................................................77
5.5.6. Creating a Yum Repository.........................................................................................................................................78
5.6. Yum Plug-ins......................................................................................................................................................................78
5.6.1. Enabling, Configuring, and Disabling Yum Plug-ins.................................................................................................79
5.6.2. Installing Additional Yum Plug-ins.............................................................................................................................80
5.6.3. Working with Yum Plug-ins........................................................................................................................................80
5.7. Additional Resources.........................................................................................................................................................81
Installed Documentation.......................................................................................................................................................81
Chapter 5 Lab Exercises...........................................................................................................................................................82
Chapter 5 Lab Solutions...........................................................................................................................................................83