Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
CompTIA Linux+ Certification Guide

You're reading from   CompTIA Linux+ Certification Guide A comprehensive guide to achieving LX0-103 and LX0-104 certifications with mock exams

Arrow left icon
Product type Paperback
Published in Sep 2018
Publisher
ISBN-13 9781789344493
Length 590 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Philip Inshanally Philip Inshanally
Author Profile Icon Philip Inshanally
Philip Inshanally
Arrow right icon
View More author details
Toc

Table of Contents (23) Chapters Close

Preface 1. Configuring the Hardware Settings FREE CHAPTER 2. Booting the System 3. Changing Runlevels and Boot Targets 4. Designing a Hard Disk Layout 5. Installing a Linux Distribution 6. Using Debian Package Management 7. Using YUM Package Management 8. Performing File Management 9. Creating, Monitoring, Killing, and Restarting Processes 10. Modifying Process Execution 11. Display Managers 12. Managing User and Group Accounts 13. Automating Tasks 14. Maintaining System Time and Logging 15. Fundamentals of Internet Protocol 16. Network Configuration and Troubleshooting 17. Performing Administrative Security Tasks 18. Shell Scripting and SQL Data Management 19. Mock Exam - 1 20. Mock Exam - 2 21. Assessment 22. Other Books You May Enjoy

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:~#
You have been reading a chapter from
CompTIA Linux+ Certification Guide
Published in: Sep 2018
Publisher:
ISBN-13: 9781789344493
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime