Booting and Shutting Down

By High School Technology Services myhsts.org Recap From Previous Session

In the previous session we learned about Booting and Shutting Down Linux. We covered - ▪ Boot Sequence ▪ The systemd Daemon ▪ The systemctl Command ▪ Targets vs. Run Levels ▪ Modifying a Target ▪ Service Unit Scripts ▪ Changing System States ▪ Booting into Rescue Mode ▪ Shutdown Commands Identifying Software Packages

If you prefer to use a graphical interface to view and manage packages in your system, you can use the Package Management Tool, better known as pirut. This tool allows you to perform basic package management of your system through an easy-to-use interface to remove installed packages or download (and install) packages compatible to your system. It also allows you to view what packages are installed in your system and which ones are available for download from Network. In addition, the Package Management Tool also automatically resolves any critical dependencies when you install or remove packages in the same way that the rpm command does. Using rpm to Manage Software

▪ RPM has five basic modes of operation (not counting package building): installing, uninstalling, upgrading, querying, and verifying. This section contains an overview of each mode. For complete details and options, try rpm --help or man rpm.

▪ Before using any RPM packages, you must know where to find them. An Internet search returns many RPM repositories, but if you are looking for RPM packages built by Red Hat, they can be found at the following locations: ▪ The CD-ROMs ▪ The Red Hat Errata Page available at http://www.redhat.com/apps/support/errata/ Using to Manage Software

▪ yum is the primary tool for getting, installing, deleting, querying, and managing Red Hat Enterprise Linux RPM software packages from official Red Hat software repositories, as well as other third-party repositories. yum is used in Red Hat Enterprise Linux versions 5 and later. Versions of Red Hat Enterprise Linux 4 and earlier used .

▪ The Yum Command Cheat Sheet for Red Hat Enterprise Linux contains a reference card outlining the common use cases for the yum command. Installing and Removing Software

You can use rpm or yum/dnf to remove software installed on your system. Displaying Device and System Information (PCI, USB)

Like for every thing, there are plenty of commands to check information about the hardware of your linux system. Some commands report only specific hardware components like cpu or memory while the rest cover multiple hardware units.

We take a quick look at some of the most commonly used commands to check information and configuration details about various hardware peripherals and devices. The list includes lscpu, hwinfo, lshw, dmidecode, lspci etc. Displaying Device and System Information (PCI, USB)

▪ The command lspci will show you the Device ID of your Network Card or any other pci device . Depending on your system you may be able to run this command without having to be root first.

▪ Try -nvv options with the lspci command to get the Device ID of network card. lspci -nvv

▪ This options will display lspci output in verbose mode with the numbers without performing a lookup in the device id list. Displaying Device and System Information (PCI, USB)

lscpu The lscpu command reports information about the cpu and processing units. It does not have any further options or functionality. lshw - List Hardware A general purpose utility, that reports detailed and brief information about multiple different hardware units such as cpu, memory, disk, usb controllers, network adapters etc. Lshw extracts the information from different /proc files. Displaying Device and System Information (PCI, USB)

hwinfo - Hardware Information Hwinfo is another general purpose hardware probing utility that can report detailed and brief information about multiple different hardware components, and more than what lshw can report. lsscsi - List scsi devices Lists out the scsi/sata devices like hard drives and optical drives. lsusb - List usb buses and device details This command shows the USB controllers and details about devices connected to them. By default brief information is printed. Use the verbose option "-v" to print detailed information about each usb port Displaying Device and System Information (PCI, USB)

lsblk - List block devices List out information all block devices, which are the hard drive partitions and other storage devices like optical drives and flash drives df - disk space of file systems Reports various partitions, their mount points and the used and available space on each. fdisk Fdisk is a utility to modify partitions on hard drives, and can be used to list out the partition information as well. Looking Forward

In the next session we’re doing to learn about Managing Users and Groups. We’ll cover - ▪ Setting Policies ▪ User File Management ▪ The /etc/passwd file ▪ The /etc/shadow file ▪ The /etc/group file ▪ The /etc/gshadow file ▪ Adding Users ▪ Modifying User Accounts ▪ Deleting User Accounts ▪ Working with Groups ▪ Setting User Environments ▪ Login Configuration Files Thank You

By High School Technology Services myhsts.org