Table of Contents Link to heading
- Motherboards
- Central Processing Unit (CPU)
- Random Access Memory (RAM)
- Buses
- Hard Drives
- Solid State Disks
- Optical Drives
- Managing Devices
- Video Display Devices
- Power Supplies
Motherboards Link to heading
or system board, is the main hardware board in the computer through which the central processing unit (CPU), random-access memory (RAM), and other components are all connected.
Depending on the computer type (laptop, desktop, server), some devices, such as processors and RAM, are attached directly to the motherboard, while other devices, such as add-on cards, are connected via a bus.
Central Processing Unit (CPU) Link to heading
or processor, is the brain of the computer, where the execution of code takes place and where calculations for the Operating System are done.
- It is directly connected (soldered) to the motherboard, as motherboards are typically configured to work with specific types of processors.
- If a hardware system has more than one processor, the system is referred to as a multiprocessor. If more than one processor is combined into a single overall processor chip, then it is called multi-core.
- There are primarily types of processors used on desktop and server computers:
x86 and x86_64.
- On an x86 system (1972), the system processes data 32 bits at a time.
- On an x86_64 (2000), the system processes data 64 bits at a time. An x86_64 system is also capable of processing data 32 bits at a time in a backward compatible mode. One of the main advantages of a 64-bit system is the ability to work with more memory, while other advantages include increased efficiency of processing and increased security.
Commands Link to heading
To see which family the current system’s CPU belongs to, use the arch
command
(similar to uname -m
- print machine hardware name):
For more information concerning the CPU architecture, use the lscpu
command:
- The first line of the above output shows that the CPU is being used in a 64-bit mode, as the architecture reported is x86_64.
- The second line of output shows that the CPU is capable of operating in either a 32- or 64-bit mode, therefore, it is actually a 64-bit CPU.
To view distribution-specific information, use the lsb_release -a
command.
For even more details about your CPU(s), you can examine the /proc/cpuinfo
file, especially the “flags” that are listed which determine whether or not your
CPU has certain features (useful to know when planning or troubleshooting
production systems). Use the head
command with the -n
option to list the
first 20 lines of the cpuinfo file:
Random Access Memory (RAM) Link to heading
For the computer to function, it needs program and system data which is stored in memory.
- The 32-bit architecture systems can use up to 4 gigabytes (GB) of RAM, while 64-bit architectures are capable of addressing and using far more RAM.
- In some cases, the RAM a system has might not be enough to handle all of the operating system requirements. Once invoked, programs are loaded in RAM along with any data they need to store, while instructions are sent to the processor when they execute.
- When the system is running low on RAM, virtual memory called swap space is a filesystem type or file used to temporarily store data to disk. Data stored in RAM that has not been used recently is moved over to the section of the hard drive designated as swap, freeing up more RAM for use by currently active programs. If needed, this swapped data can be moved back into RAM at a later time. The system does all of this automatically as long as swap is configured.
Commands Link to heading
To discover the amount of free and used memory in your system, use the free
command; together with the -m
option to round the output to megabyte (MB) and
the -g
option to round the output to gigabyte (GB):
Buses Link to heading
a high-speed connection that allows communication between computers or the components inside a computer.
- The motherboard has buses that allow for multiple devices to connect to the system, including the Peripheral Component Interconnect (PCI) and Universal Serial Bus (USB).
- Increasingly for laptop and light/thin/small form factor computers, the majority of the computer’s components may be directly connected to the motherboard, including the usual processor, RAM, as well as additional components like the network card. In this configuration, the bus still exists, but effectively one of the main convenience factors of being able to swap out or upgrade devices is no longer a possibility.
- Peripheral devices are components connected to a computer that allow input, output, or data storage, such as keyboards, monitors, and printers.
- The Universal Serial Bus (USB) is used for many external devices (or peripherals), while the Peripheral Component Interconnect (PCI) bus is used for internal devices such as sound and network cards.
- Devices connected internally are usually cold-plug, meaning the system must
be shut down in order to connect or disconnect a device. USB devices are
hot-plug, meaning they can be connected or disconnected while the system is
running.
- Though USB devices are hot-plug by design, it is important to ensure that any mounted filesystem is correctly unmounted, or data loss and corruption of the filesystem may occur.
Commands Link to heading
To list all devices connected to the PCI bus, use the lspci
command. The
output of the lspci command can be helpful for identifying devices that are not
supported by the Linux kernel.
Use with the -k
option to show devices along with the kernel driver and
modules used:
To display all devices connected to the system via USB, use the lsusb
command:
This is how you can get information on any USB memory sticks that you may want to mount, as well as peripheral devices like mice and keyboards.
Hard Drives Link to heading
also called hard disks, disk devices, or storage devices, can be connected directly to the motherboard, on a PCI card, or as a USB device.
- For the purposes of most Linux systems, a hard drive can generally be defined as any electromechanical or electronic storage device that holds data to be accessed by the system.
- Hard drives are divided into one or more partitions.
- A partition is a logical division of a hard drive, designed to take a large amount of available storage space and break it up into smaller areas.
- While it is common on Microsoft Windows to have a single partition for each hard drive, on Linux distributions, multiple partitions per hard drive is common.
- Some hard drives make use of a partitioning technology called Master Boot
Record (MBR) while others make use of a partitioning type called GUID
Partitioning Table (GPT).
- An old term used to describe an internal hard disk is fixed disk, as the
disk is fixed (not removable). This term gave rise to several command
names: the
fdisk
,cfdisk
, andsfdisk
commands, which are tools for working with the MBR partitioned disks. - The GPT disks use a newer type of partitioning, which allows the user to
divide the disk into more partitions than what MBR supports. GPT also
allows having partitions which can be larger than two terabytes (MBR does
not). The tools for managing GPT disks include the
gdisk
,cgdisk
, andsgdisk
commands.- There is also a family of tools that attempt to support both MBR and GPT
type disks. This set of tools includes the
parted
command and the graphicalgparted
tool.
- There is also a family of tools that attempt to support both MBR and GPT
type disks. This set of tools includes the
- An old term used to describe an internal hard disk is fixed disk, as the
disk is fixed (not removable). This term gave rise to several command
names: the
- Hard drives are associated with file names (called device files) that are
stored in the /dev directory. Each device file name is made up of multiple
parts.
- File Type: The file name is prefixed based on the different types of hard drives. IDE (Intelligent Drive Electronics) hard drives begin with hd, while USB, SATA (Serial Advanced Technology Attachment) and SCSI (Small Computer System Interface) hard drives begin with sd.
- Device Order: Each hard drive is then assigned a letter which follows the prefix. For example, the first IDE hard drive would be named /dev/hda and the second would be /dev/hdb, and so on.
- Partition: Finally, each partition on a disk is given a unique numeric indicator. For example, if a USB hard drive has two partitions, they could be associated with the /dev/sda1 and /dev/sda2 device files.
The following example shows a system that has three sd devices: /dev/sda, /dev/sdb and /dev/sdc. Also, there are two partitions on the first device, as evidenced by the /dev/sda1 and /dev/sda2 files, and one partition on the second device, as evidenced by the /dev/sdb1 file:
Commands Link to heading
The fdisk
command is useful for identifying and manipulating disk storage
resources on a system. Since it can be used to create, format, and delete
partitions, as well as for getting information, it should be used with care in
administrator mode to avoid data loss. The fdisk command can be used in two
ways: interactively and non-interactively.
- When the
-l
option is used with fdisk, then the command will non-interactively list block devices, which includes disks (hard drives) and logical volumes. - Without the
-l
option, the fdisk command enters an interactive mode that is typically used to modify partitions on a disk devic
Execute the fdisk command to list the disk devices. The -l option lists the partition tables for the specified devices and then exits. If no devices are given, those mentioned in /proc/partitions (if that file exists) are used.
Solid State Disks Link to heading
a type of hard disk that has no moving parts or spinning disks, just memory locations to be read by the controller, and therefore is faster in accessing the information stored in its memory chips.
- Advantages:
- Lower power usage, less heat and vibration, and less time system booting and loading programs.
- Disadvantages:
- Lower capacity due to higher cost and no ability to upgrade if soldered onto the motherboard.
Optical Drives Link to heading
- Removable storage media, often referred to as CD-ROMS, DVDs, or Blu-Ray.
- Removable drives are mounted on the Linux filesystem
- Older distributions mount drives on /mnt
- Newer distributions mount drives on /media or /var/run/medi
- For example, a USB thumb drive might be mounted on the /media/usbthumb path.
- Upon mounting, most GUI interfaces prompt the user to take some action, such
as open the contents of the disk in a file browser or start a media program.
When the user is finished using the disk, it is necessary to unmount it using
a menu or the
umount
command.
Managing Devices Link to heading
To function, hardware devices need software, called drivers, that allows them to communicate with the Operating System.
- The driver could be compiled as part of the Linux kernel, loaded into the kernel as a module, or loaded by a user command or application.
- External devices, like scanners and printers, typically have their drivers loaded by an application and these drivers, in turn, communicate through the device via the kernel through an interface such as USB.
Commands Link to heading
To view the currently loaded modules, use the lsmod
command.
The first column is the module name, and the second is the amount of memory used by the module. The number in the “Used by” column indicates how many other modules are using the module. The names of the other modules using the module may also be listed in the “Used by” column.
Video Display Devices Link to heading
In order to display output to an attached monitor, the computer system must have a video display device (video card). Video display devices are often directly built into or attached to the motherboard, or connected through PCI bus.
There are three types of video cables commonly used:
- The older but still used analog 15-pin Video Graphics Array (VGA) cable.
- The more recent 29-pin Digital Visual Interface (DVI) interface.
- The very widely-used High-Definition Multimedia Interface (HDMI) which supports resolutions up to the 4K or Ultra HD range, and has either 19 or 29 pins.
- The newest digital display interface, the 20-pin DisplayPort (DP). Also, its miniaturised counterpart, the Mini DisplayPort, used mainly for Apple products.
For monitors to work correctly with video display devices, they must be able to support the same resolution as the video display device. Normally, the software driving the video display device can automatically detect the maximum resolution that the video display and monitor can both support and set the screen resolution to that value.
Power Supplies Link to heading
devices that convert alternating current (120v, 240v) into direct current, which the computer uses at various voltages (3.3v, 5v, 12v).
- They are generally not programmable.
- These devices protect the computer from fluctuations in voltage coming from the power source.
- Desktop, server tower, rack, and standalone systems are more vulnerable to power fluctuations than laptop systems are. If the power fluctuates, it can cause much havoc on the non-battery based systems, whereas a laptop simply keeps pulling power from its internal battery until depleted.