Ex200 Flashcards
Command to copy files
cp
Command to remove a directory
rmdir
Command to create a directory
mkdir
Command to show a directory structure and files it contains
tree
Command to show the contents of a text file
cat
Command to match the contents of output with provided text
grep
Command to query & view logs from the systemd journal
journalctl
Command used to switch to another user account in the terminal.
su
Command used to execute commands with elevated privileges
sudo
Command used to add user
useradd
Command used to add a group
groupadd
Command used to determine who is logged in
whoami
Command used to display the user and group information for a specified user or the current user
id
File location to see user information such as home path and ID number
/etc/passwd
File location to see encrypted password of users and the details about when last set, expiration, etc.
/etc/shadow
File location to see group information
/etc/group
Command used to show the manual
man
Option on commands to show available options
--help
Path to where system documentation is located
/usr/share/doc
Command to show you where the command you specify is located
where
Command to search files and directories
find
What are the 2 text editors typically used
vivim
Command used to make hard or soft links
ln
Command used to change the permissions of files and directories
chmod
Command used to change the ownership of files and directories
chown
Command used to set default permissions for newly created files & directories
umask
Command used to change the group ownership of files and directories
chgrp
What 2 commands can be used for creating an archive file
tarstar
What is a common set of options for compressing a .gz file
tar -czvf(create, gzip compression, verbose so see the processing of the files, specify filename)
What is a common set of options for compressing a .bz2 file
tar -cjvf (create, bzip2 compression, verbose so see the processing of the files, specify filename)
What are common set of options for decompressing a .gz file
tar -xzvf (extract, gzip compression, verbose so see the processing of the files, specify filename)
What are common set of options for decompressing a .bz2 file
tar -xjvf(extract, bzip2 compression, verbose so see the processing of the files, specify filename)
What is syntax to extract a single file from a compressed .gz file
tar -xzvf Compressed.tar.gz /path/SingleFile.txt(extract, gzip compression, verbose so see the processing of the files, specify filename)
What is the command to check the size of a directory
du -sh /path
The command to list information about block devices
lsblk
Command to list all currently mounted filesystems
findmnt
The command to attach a disk device to a path
mount
The command to disconnect a disk device from a path
umount
Utility to partition the disks
fdisk
Format a disk with ext4 filesystem
mkfs.ext4 (mkfs = make filesystem)
Format a disk with xfs filesystem
mkfs.xfs (mkfs = make filesystem)
Command to create a swap area on a device or file
mkswap
Command to activate a swap file or partition
swapon
Command to deactivate a swap file or partition
swapoff
The file to modify that defines the devices and mount points to use at boot and dependencies
/etc/fstab
What is the command to see CPU & memory utilization related to processes?
top
What is the command to see storage related metrics for processes?
iotop
Command that converts/copies files, can be whole partitions
dd
Command to show the access control list on files or directories
getfacl
Command to assign the access control list on files or directories
setfacl
Command to see the membership of groups that a user belongs to
groups
The command that allows for management of the network interfaces from the command line
nmcli
File used to specify the DNS servers to use
/etc/resolv.conf
The file that controls the order of host names (file) or dns entries for name resolution
/etc/nsswitch.conf
Syntax to locate a file on the system
find / -name filename.txt
Command used to manage and run containers
podman
Command used to inspect images and repositories for containers
skopeo
Full syntax to install tools such as podman & skopeo
sudo yum module install container-tools
Create a volume with virtual disk optimizer
vdo create
Display the statistics of a virtual disk optimized volume
vdostats
Command to initialize a physical volume on a block device
pvcreate
Command to create a volume group on a physical volume
vgcreate
Command to create a logic volume in logical volume manager
lvcreate
Command to check the physical volume information
pvs
Command to show the information about volume groups
vgs