Book Image

CompTIA Linux+ Certification Guide

By : Philip Inshanally
Book Image

CompTIA Linux+ Certification Guide

By: Philip Inshanally

Overview of this book

The Linux+ certification provides a broad awareness of Linux operating systems, while giving professionals an upper hand in the IT industry. With this certification, you’ll be equipped with the all-important knowledge of installation, operation, administration, and troubleshooting services. This CompTIA Linux+ Certification Guide will give you an overview of the system architecture. You’ll understand how to install and uninstall Linux distributions, followed by working with various package managers. You’ll then move on to manipulating files and processes at the command-line interface (CLI) and creating, monitoring, killing, restarting, and modifying processes. As you progress, you’ll be equipped to work with display managers and learn how you can create, modify, and remove user accounts and groups, as well as understand how to automate tasks. The last set of chapters will help you configure dates and set up local and remote system logging. In addition to this, you’ll explore different internet protocols, and delve into network configuration, security administration, Shell scripting, and SQL management. By the end of this book, you’ll not only have got to grips with all the modules you need to study for the LX0-103 and LX0-104 certification exams, but you’ll also be able to test your understanding with practice questions and mock exams.
Table of Contents (23 chapters)
19
Mock Exam - 1
20
Mock Exam - 2

Interrupts and devices

Now let's switch gears and look at the Interrupt Requests (IRQs) and devices that are available in our Linux system. You can think of an interrupt as a service hotline that we would use whenever we need a particular item. We would ring a service hotline. The theory remains the same for devices within a Linux system; whenever it requires the CPU's attention, it sends out signals via interrupts. Traditional 32-bit architectures support up to 16 interrupts (0-15, as shown in the following screenshot). Newer architectures support far more than 16 interrupts.

Let's take a look at the /proc directory once again, honing in on /proc/interrupts:

More interrupts are shown in the following screenshot:

Some more interrupts are shown in the following screenshot:

From the preceding output, we can see that there are far more interrupts available. The output is read from left to right, where left represents the interrupt number, and moving to the right indicates the devices or services that are using the interrupts. We can see that the timer is using interrupt 0.

Now, let's turn our attention to devices. When we work with devices in a Linux system, the devices are represented by files. This enables us to communicate with the actual hardware in the system. There are some commonly used devices, such as hard disks, DVDs, and USBs, to name a few. Hard disks are represented as sd(n). For example: /dev/sda, /dev/sdb, /dev/sdc, and so on. Hard disk partitions are represented in the form of sd(n). For example: /dev/sda1, /dev/sda2, /dev/sdb1, and so on. Similarly, floppy disks are represented as fd. There are some special use-case files, such as /dev/null, /dev/zero, and /dev/tty*. You would use /dev/null when you want to send output from another command and the output is not needed. This is known as redirecting. /dev/zero is used in conjunction with the dd command that we covered earlier for creating blank files. /dev/tty* is used for remote logins. Let's take a look at how devices are shown in the Linux environment.

We will take a look at /proc/devices using our test Linux system:

From the preceding output, the hard disk and partition are represented in the format of /dev/sdXY, where X represents the hard disk and Y represents the partition. We can tell the ls command to filter the output to only the hard disk and partition information as follows:

root@trainer-virtual-machine:~# ls /dev/sd*
/dev/sda /dev/sda1 /dev/sda2 /dev/sda3 /dev/sda4
root@trainer-virtual-machine:~#