Podcast
Questions and Answers
Which command(s) below utilize globbing to expand wildcard characters into matching filenames?
Which command(s) below utilize globbing to expand wildcard characters into matching filenames?
- echo
- display
- ls
- bash (correct)
When using the rm
command to remove directories, which options are required to recursively delete a directory and its contents?
When using the rm
command to remove directories, which options are required to recursively delete a directory and its contents?
- -R (correct)
- -r (correct)
- -A
- -D
In a long listing (ls -l), which character indicates that a file is a symbolic link?
In a long listing (ls -l), which character indicates that a file is a symbolic link?
- -
- d
- c
- | (correct)
What character precedes the name of hidden files and directories in Unix-like systems?
What character precedes the name of hidden files and directories in Unix-like systems?
Which option for the ls
command sorts the output by file size, from largest to smallest?
Which option for the ls
command sorts the output by file size, from largest to smallest?
Regarding file compression, is it accurate to say that gzip
and bzip2
are different commands?
Regarding file compression, is it accurate to say that gzip
and bzip2
are different commands?
To achieve combined standard and error output redirection to a single file, which of the following is correct?
To achieve combined standard and error output redirection to a single file, which of the following is correct?
Which command is designed to concatenate lines from two files based on their position in the file, rather than their content?
Which command is designed to concatenate lines from two files based on their position in the file, rather than their content?
Which command is used to display information about the Linux kernel?
Which command is used to display information about the Linux kernel?
Which of the following command types can a command be in Linux?
Which of the following command types can a command be in Linux?
Which of the following are valid command lines in Linux?
Which of the following are valid command lines in Linux?
In the cal [-smjy13] [[[day] month] year]
command syntax, what does the []
characters around day
indicate?
In the cal [-smjy13] [[[day] month] year]
command syntax, what does the []
characters around day
indicate?
What does the syntax [-u|–utc|–universal]
signify regarding command options?
What does the syntax [-u|–utc|–universal]
signify regarding command options?
To remove a variable from the current shell environment, which command would you use?
To remove a variable from the current shell environment, which command would you use?
How are local variables characterized in a Linux shell environment?
How are local variables characterized in a Linux shell environment?
Which command correctly adds the /data
directory to the existing $PATH
variable?
Which command correctly adds the /data
directory to the existing $PATH
variable?
After modifying /data
, what command ensures the changes are applied without a full unmount and remount?
After modifying /data
, what command ensures the changes are applied without a full unmount and remount?
What is the consequence when a user exceeds their block soft quota and the grace period expires?
What is the consequence when a user exceeds their block soft quota and the grace period expires?
Which directories are commonly configured to allow any user to write files?
Which directories are commonly configured to allow any user to write files?
Which command activates a prepared swap space for system use?
Which command activates a prepared swap space for system use?
Which command is specifically designed to back up and restore partition tables?
Which command is specifically designed to back up and restore partition tables?
What command appends a physical volume to an existing volume group in LVM?
What command appends a physical volume to an existing volume group in LVM?
When a partition fails to unmount, which utilities list processes using the filesystem, thus preventing unmounting?
When a partition fails to unmount, which utilities list processes using the filesystem, thus preventing unmounting?
Which commands display a list of currently mounted file systems and their mount points?
Which commands display a list of currently mounted file systems and their mount points?
Which two commands are used to examine and modify ext2/3/4 filesystems?
Which two commands are used to examine and modify ext2/3/4 filesystems?
Which file does the fsck
utility primarily consult to determine the filesystem type during a check?
Which file does the fsck
utility primarily consult to determine the filesystem type during a check?
Which command displays the location of backup superblocks for a given filesystem?
Which command displays the location of backup superblocks for a given filesystem?
Given the output ls -l /etc/grub.conf -> ../boot/grub/grub.conf
, which file is the soft link?
Given the output ls -l /etc/grub.conf -> ../boot/grub/grub.conf
, which file is the soft link?
If five hard links point to the same inode, and four are deleted (including the original filename), what happens to the data?
If five hard links point to the same inode, and four are deleted (including the original filename), what happens to the data?
Which directory is conventionally used as a temporary mount point for filesystems?
Which directory is conventionally used as a temporary mount point for filesystems?
After modifying the /etc/lilo.conf
file, which command must be executed for the changes to take effect?
After modifying the /etc/lilo.conf
file, which command must be executed for the changes to take effect?
During the boot process, after the bootloader stage (LILO/GRUB), which phase is initiated?
During the boot process, after the bootloader stage (LILO/GRUB), which phase is initiated?
When configuring a new Linux system, which character is required at the beginning of an absolute file path?
When configuring a new Linux system, which character is required at the beginning of an absolute file path?
Which file, when placed in a user's home directory, is executed automatically when the user logs out of the system?
Which file, when placed in a user's home directory, is executed automatically when the user logs out of the system?
After starting a terminal session, which command displays a list of processes running within that terminal?
After starting a terminal session, which command displays a list of processes running within that terminal?
To modify a process's priority to a value lower than 0 using the renice
command, which user privileges are required?
To modify a process's priority to a value lower than 0 using the renice
command, which user privileges are required?
In Bash, which globbing character is used to match exactly one arbitrary character in a filename?
In Bash, which globbing character is used to match exactly one arbitrary character in a filename?
When the touch
command is used on an existing file without any options, which file metadata is updated?
When the touch
command is used on an existing file without any options, which file metadata is updated?
When using the find
command, which option executes a specified command on each found file without prompting for confirmation?
When using the find
command, which option executes a specified command on each found file without prompting for confirmation?
Which of the following find
command options enables a case-insensitive search when matching filenames?
Which of the following find
command options enables a case-insensitive search when matching filenames?
In a Linux system, how do runlevels typically manage services during the boot process?
In a Linux system, how do runlevels typically manage services during the boot process?
Which of the following statements best describes the role of /var/log/dmesg
in the Linux boot process?
Which of the following statements best describes the role of /var/log/dmesg
in the Linux boot process?
When examining system performance, the free
command provides a summary of RAM and swap space usage. Which of the following metrics is NOT typically reported by the free
command?
When examining system performance, the free
command provides a summary of RAM and swap space usage. Which of the following metrics is NOT typically reported by the free
command?
Coldplug devices are connected when the power is off. How does the system typically manage these devices upon startup?
Coldplug devices are connected when the power is off. How does the system typically manage these devices upon startup?
The command lspci
is used to view information about network interface controllers connected on a PCI bus. What type of information would you expect to obtain about the NIC using this command?
The command lspci
is used to view information about network interface controllers connected on a PCI bus. What type of information would you expect to obtain about the NIC using this command?
Flashcards
uname command
uname command
Displays information about the Linux kernel.
What a Command Can Be
What a Command Can Be
A program built into the shell, an alias or a function.
[] in command syntax
[] in command syntax
Optional arguments.
[-u|–utc|–universal] syntax
[-u|–utc|–universal] syntax
Signup and view all the flashcards
unset command
unset command
Signup and view all the flashcards
Local variables
Local variables
Signup and view all the flashcards
PATH=$PATH:/data
PATH=$PATH:/data
Signup and view all the flashcards
ps -e
ps -e
Signup and view all the flashcards
What command performs globbing?
What command performs globbing?
Signup and view all the flashcards
rm options to delete directories with files?
rm options to delete directories with files?
Signup and view all the flashcards
Symbolic link indicator in long listing
Symbolic link indicator in long listing
Signup and view all the flashcards
Character for hidden files
Character for hidden files
Signup and view all the flashcards
ls option to sort by size
ls option to sort by size
Signup and view all the flashcards
Command to merge files line by line
Command to merge files line by line
Signup and view all the flashcards
Example of a non-interactive editor
Example of a non-interactive editor
Signup and view all the flashcards
Command to display a file with line numbers
Command to display a file with line numbers
Signup and view all the flashcards
Remounting '/data'
Remounting '/data'
Signup and view all the flashcards
Exceeded Block Soft Quota
Exceeded Block Soft Quota
Signup and view all the flashcards
World-Writable Directories
World-Writable Directories
Signup and view all the flashcards
Activate Swap Space
Activate Swap Space
Signup and view all the flashcards
Backup/Restore Partition Table
Backup/Restore Partition Table
Signup and view all the flashcards
Add PV to VG
Add PV to VG
Signup and view all the flashcards
Find Processes Using Mount
Find Processes Using Mount
Signup and view all the flashcards
List Mounted Filesystems
List Mounted Filesystems
Signup and view all the flashcards
Filesystem Utilities
Filesystem Utilities
Signup and view all the flashcards
/etc/fstab
/etc/fstab
Signup and view all the flashcards
dumpe2fs
dumpe2fs
Signup and view all the flashcards
Soft link file
Soft link file
Signup and view all the flashcards
Hard link deletion
Hard link deletion
Signup and view all the flashcards
/mnt
/mnt
Signup and view all the flashcards
lilo
lilo
Signup and view all the flashcards
Third boot stage
Third boot stage
Signup and view all the flashcards
Absolute path character
Absolute path character
Signup and view all the flashcards
~/.bash_logout
~/.bash_logout
Signup and view all the flashcards
ps command
ps command
Signup and view all the flashcards
User to set priority below 0
User to set priority below 0
Signup and view all the flashcards
Glob character: ?
Glob character: ?
Signup and view all the flashcards
touch command effect
touch command effect
Signup and view all the flashcards
find -exec option
find -exec option
Signup and view all the flashcards
find -iname option
find -iname option
Signup and view all the flashcards
Runlevels
Runlevels
Signup and view all the flashcards
Debian Default Runlevel
Debian Default Runlevel
Signup and view all the flashcards
/var/log/dmesg
/var/log/dmesg
Signup and view all the flashcards
free command
free command
Signup and view all the flashcards
lspci command function
lspci command function
Signup and view all the flashcards
Study Notes
- The
uname
command displays information about the Linux kernel.
Commands
- Valid command lines include
Is -l /etc
andIs /etc -l
- To delete a variable, use the unset command.
- To view all processes, execute
ps -e
. - To run a command in the background, type
<command>&
- Use
killall
to send a signal to a set of processes with the same name echo ???a
command displays only a file named ???a- The
bash
command performs globbing
rm Command
- The
-R
and-r
options for therm
command can be used to delete directories that contain files
Utilities
gzip
andbzip
are not aliases for the same utilitybzip2
does not support recursive compression
dd Command
- The
dd
command can create large files that can be used as swap files - The
dd
command can copy entire partitions stdout
is the output stream of a command operating normally- Two or more commands combined with the
|
between them form a pipeline - Use
2>>
to append a file with the normal output of a command - Use
&>
to send the normal and error output of a command to a single file
File Manipulation
- The
paste
command merges two files together line by line sed
is a non-interactive editor- Use the
nl
command to display a file with its lines numbered - The
sort
command puts the lines of a file in alphabetical order - The
pr
command provides formatting options for printing a file
Regular Expressions
- The
.
Matches any one character in regular expressions - The
*
Matches zero or more of the previous character in regular expressions - The regular expression
a?
is equivalent toa{0,1}
- To use regular expression characters to match themselves, do not use the slash in front of the character
vi Command Mode Navigation
- Press
$
to navigate to the end of the line in vi command mode - Press
b
to move backward through a vi document, word by word - To save and then quit in vi command mode, type
:wq
- Press
h
or the left arrow key to move a character to the left in vi command mode - Press
k
or the up arrow key to move up a line in vi command mode
File Permissions
- An octal permission mode of 750 corresponds to rwxr-x---
- Only root can change the owner of a file
- With rw-r--x permissions, both the user owner and group owners can view the contents of a file, assuming everyone has access to the directory the file is in
- To switch to another group, you must be a member of the group you are switching to
chmod 0777 /data
will remove all special permissions
Disk Quotas
userquota
andgrpquota
are mount options used for disk quotas- The
repquota
command lists the users of groups and their quota statistics mount -o remount /data
will remount the /data filesystem using the option from the /etc/fstab file- If a user has exceeded the block soft quota and the grace period has expired, the soft limit becomes a hard limit until the user goes below the soft limit again
Directories with Writable Permissions
- The
/tmp
and/var/tmp
directories are typically writable to all users - Execute
swapon
to activate an initialized swap space
Partition Management
- Use
sfdisk
to backup a partition table to a file and restore it later - Use
vgextend
to add a physical volume to an existing volume group - Use
Isof
andfuser
to check what is keeping the partition busy mount
anddf
commands can display a list of mounted file systems- The first field in
/etc/fstab
specifies the device to mount - The sixth field in the
/etc/fstab
file is used to specifyfsck
order mount -o loop cdrom.iso /mnt
will mount an ISO file named cdrom.iso- The
-S du
command option shows a summary of the space used in a directory structure. - The number of inodes determines how many files can be stored in a filesystem.
tune2fs
anddumpe2fs
commands will display information about the Superblock- The fsck utility uses the
/etc/fstab
file to determine a filesystem type dumpe2fs
command will allow determining where the backup superblock is for a filesystem- The output of
ls -l
command includes the file/etc/grub.conf
as the soft link file
Hard vs Soft Links
- If you have 5 hard linked files and you delete four of them, the data is still available from the remaining file
- The
/mnt
directory is used as a temporary mount point - Use the
lilo
command needs to be executed after modifying the LILO configuration file - The
boot
is a directive is not typically used after a title directive in GRUB Legacy - The kernel phase is the third stage of the boot process
- The bootloader loads the ramdisk into memory
- The kernel is a component of memory
- Runlevel 2 is used to define multi-user with no networking services
System Commands
- The commands
reboot
andshutdown -r
can be used to reboot the Linux system - The
uname -s
option to will display the kernel name
RPM Packages
- An RPM command requires the full filename when querying the package
- The package file requires the
-p
option to query - When using the
-f
option when performing an rpm query, the command will show the package that owns a file rpm -U figlet-1.1-0.3.i686.rpm
andrpm -i figlet-1.1-0.3.i686.rpm
commands will install a RPM package file
Other Commands
- The
rpm2cpio
command can extract files from a-.rpm
file and list the content of a-.rpm
file - The automatically searched directories for shared libraries are
/usr/lib
and/lib
- The command
apt-get purge
will remove all files that belong to a Debian package apt-get update
command will update the list of available packages for APT- The
dpkg -S
command determines the Debian package that owns a file dpkg –I
can be used get a list of the installed Debian packages- The
apt-cache show
anddpkg -s
commands will show detailed information about a Debian package
Linux Executables
Idd
command is used to display the shared libraries of a dynamically linked executablerpm -qKp
command will check the integrity of an RPM file- The
1
special file man pages are typically located in section for Shell commands - The
/
character always starts with an absolute path - Place
~/.bash_logout
in your home directory to be executed when you log off the system - The
ps
command lists the commands that are running in your terminal - You must log in as the root user in order to set a priority value lower than 0
- Character
?
exactly matches one character in glob - The touch command's default action on an existing file will update the file's timestamp
find Command
- The
-exec
option will execute a command on each matching file without prompting in find command - The
-iname
option find command will search by name using a case-insensitive match - The command
Is > /tmp/output.txt
takes the standard output ofIs
and puts it into the/tmp/output.txt
file - The
-p
option is used with the edquota command to copy the quota limits from one user account to another. - A dual boot system contains both Linux and a Microsoft Windows operating system
- Most users home directories are found in
/home
. - Virtual memory is also referred to as swap memory.
- The
/var
structure has directories which may have heavy activity for services like mail, ftp, httpd and printing
Additional Information
- After running
fdisk -cu /dev/sdb
, thew
fdisk command allows you to save changes and quit Ivcreate
is used to create a logical volume- The
-m
option to thetune2fs
command changes the space reserved for system use - The
-exclude
option with the du command allows specifying a subdirectory to not include in the results -f
is the option to the fsck command forces a system check- The
-t
fsck command option specifies the filesystem type - The
-b
indicates soft link in theIs -I
command - Soft links can be made to directories
- Soft links can only be made to a file on another filesystem
- The
/boot
directory stores the kernel - Full path to the LILO configuration file is
/etc/lilo.conf
Encrypted Passwords
- To use an encrypted password in the GRUB Legacy configuration file, use the
-crypt
option for the password directive - Primary configuration file for the GRUB 2 on a Fedora system is
/boot/grub2/grub.cfg
- The first process that the kernel launches is called the init process
- The program that first starts the boot process is called the bootloader
- Shared libraries make Programs smaller and use a more consistent base of code
- The
include Id.so.conf.d/*.conf
contents are in the Idconfig configuration file by default - The libraries used by the
/bin/Is
command are displayed usingIdd /bin/ls
- It's false that the same set of services are started or stopped at different runlevels
- The default runlevel for Debian based Linux systems is 2
bootup
is not a Linux boot system- The
/var/log/dmesg
file is overwritten at the end of each boot process with the messages that were generated while booting - Use the command
free
to view the summary of the RAM and swap space - True, Coldplug devices are devices that are connected when the power is off
Ispci
to view the network interface controller connected on the PCI bus- HALD is the abbreviation and stands for Hardware Abstraction Layer Daemon
- HALD uses dbus to send notifications about any changes in the state of hardware devices
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.