CentOS (Red Hat)

Also known as Red Hat.

Using the Bash (CLI)

Command Prompt Dissection
rootThe home directory of root , the system administrator
home Home directories of regular users
binShells and command-line utilities, some of which are required to run the system
sbinCommand-line system administration utilities, several of which are required to run the
libReusable system libraries needed by programs
usrPrograms, configuration settings, libraries, and help files that can be shared with
multiple systems
usr/binMany utilities and applications
usr/sbinMany system administration utilities
usr/libMany reusable system libraries that are used and dependent on by programs
varVariable data such as logs, database, web files, spool directories for mail, and so on
bootThe kernel, initial RAM disk, and boot loader, which are responsible for booting up the
etcSystem-wide configuration files
lost+foundFiles recovered by the file system checker after improper shutdowns such as a system
crash or power failure
mediaDirectories used for automatically mounting removable drives such as CD-ROM, DVD,
and USB storage devices
miscDirectories typically used for mounting NFS directories
srvData served by your system through services such as web, ftp, or cvs
mntFolders used for temporarily mounting remote directories (NFS, Samba) and removable drives(CD-ROM, DVD, and USB devices)
optthird-party software applications
procA virtual filesystem that contains special files used for changing or displaying kernel
devFiles that represent the hardware devices in your system and virtual devices supplied by
the kernel
selinuxA virtual filesystem containing special files used for changing or displaying SELinux
sysA virtual filesystem that contains special files used for changing or displaying devices
that are hot-pluggable
tmpTemporary files and folders that are deleted periodically by the system
Subdirectories in the Root Directory

Command List

whoamicurrent working user
su – rootswitch user to admin/root
pwdDisplays the present working directory.
cd <directory>
Changes the working directory.
mkdir <directory>
Creates a new directory.
mv <source> <target>
Renames or moves files or directories
ls <directory>
Lists the contents of a directory
root directory contents: ls /
rm <file> [<file2>[<file..>]]
Deletes files.
rmdir <directory>
Deletes an empty directory.
For more information: man <command name>


/root directory

ls -l /

Files such as text, image, database, binary, and so on
d (directory)A special file that can contain other files
(symbolic link)
A shortcut or reference to another file
(block device)
Devices that can send and receive buffered or random data such as CD, DVD, and hard disks
(char. device)
Devices that can send and receive data in a sequence of characters, such as modems and virtual terminals
Files used for communication within processes in the local system without using network protocols
(named pipe)
Pipes represented in the filesystem

vi <filename.txt>

press ‘i’ to enter text; press escape button, then immediately type ‘:q’ (‘:q!’ to quit without saving) then press ‘Enter’ to save and quit

to view contents of a file: cat <filename>


to view repo list: yum repolist

to install packages (packages to install are in repository): yum install <packagename>

To add user (add when in root): adduser <username>

To install/enable the PowerTools repository:

  • sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
    • sudo dnf config-manager –set-enabled PowerTools
    • # if above fails, try the below
    • sudo dnf config-manager –set-enabled powertools

Package List

Package TypePackage NameUse
web browserlynxlynx <URL>


Launch applications . . .

  1. Press Activites @ top left >
    • OR
  2. Press Win/Command button on keyboard > select app and press Enter key

Switch tasks: Win/Command key + Tab