Font size
WorksheetsLinux Fundamentals Review
Total questions: 130
Worksheet time: 1hrs 6mins
What is the purpose of configuring systems with or without external peripherals?
To enhance system security
To improve system aesthetics
To ensure compatibility with various devices
To increase processing speed
Which tool is used to list various hardware information in Linux?
lsusb
grep
nano
chmod
What is the difference between coldplug and hotplug devices?
Coldplug devices can be connected while the system is running, hotplug cannot
Hotplug devices can be connected while the system is running, coldplug cannot
Coldplug devices are faster than hotplug devices
Hotplug devices are more secure than coldplug devices
Which command is used to change the boot target or runlevel in Linux?
shutdown
reboot
systemctl
ls
What is the role of the superuser in Linux?
To manage network settings
To perform administrative tasks
To create user interfaces
To develop software applications
What is the purpose of allocating filesystems and swap space in Linux installation?
To increase the speed of the system
To separate partitions or disks
To enhance the graphical interface
To improve network connectivity
Which feature rich Linux boot loader is commonly installed and can be configured?
BOOTSTRAP
GRUB/GRUB2
NTLDR
SYSLINUX
Which package management tool is used for managing Debian-based software?
YUM
APT
DNF
Zypper
What is one of the tasks involved in managing Red Hat-based software?
Using APT for package management
Installing, upgrading, and removing packages using RPM
Configuring the boot loader
Allocating swap space
Which command is used to list directory contents in Unix?
cd
ls
cat
rm
Which command is used to copy files and directories recursively in Linux?
cp -r
mv
rm -r
ls
What is the function of the 'find' command in Unix?
To locate and act on files based on type, size, or time
To delete files
To change file permissions
To list directory contents
How can you redirect standard output to a file in Linux?
Using the 'ls' command
Using the 'cd' command
Using the '>' operator
Using the 'rm' command
What is the purpose of using pipes in Unix?
To delete files
To send the output of one command to the input of another
To change file permissions
To list directory contents
What is the default priority of a job that is created in Linux?
High
Low
Normal
Critical
Which command is used to change the priority of a running process in Linux?
chmod
nice
grep
vi
What tool can be used to search text files using regular expressions?
What command is used to create partitions and filesystems in Linux?
mkfs
fdisk
mount
ls
Which filesystem types can be created using mkfs?
ext3, ext4, nfs
ntfs, fat32, hfs
btrfs, zfs, xfs
apfs, exfat, reiserfs
What is the purpose of monitoring free space and inodes in a filesystem?
To increase system speed
To maintain filesystem integrity
To enhance security
To improve user interface
How can you configure a filesystem to mount on bootup?
Edit /etc/fstab
Use the mount command
Modify /etc/passwd
Change /etc/hosts
What is the purpose of setting up a disk quota for a filesystem?
To limit user access
To manage disk usage
To enhance performance
To increase security
What is one of the tasks involved in managing file permissions and ownership according to best practices?
Create symbolic links
Use the group field to grant file access to group members
Discuss workplace skills
Identify softlinks
What is the difference between copying and linking files?
Copying creates a new file, linking does not
Linking creates a new file, copying does not
Both create new files
Neither creates new files
What is the purpose of using access modes such as suid, sgid, and the sticky bit?
To create symbolic links
To maintain security
To discuss legal requirements
To identify softlinks
To log out of the shell program, use...
logout
exit
df
close
Get rid of a mess of useless information on the terminal screen
cls
clear
wipe
blank
A partition that is used to form virtual memory is called ___________.
RAM space
Test space
Swap space
Normal space
A Linux distribution is a collection of, usually open source, software on top of a Linux kernel
True
False
What is the core of a Linux Operating System?
Kernel
Shell
Command
GUI
What is Shell?
Main processing Unit
Default interface to Linux
Interpreter/bridge between hardware and the operating system
A program which enables you to access a shell
What is Terminal?
A program which enables you to access a shell
Default interface to Linux
Interpreter/bridge between hardware and the operating system
The hard candy coating on an M&M
Which of the following commands in Linux is used to display information about files and directories contained within the current working directory?
pwd
ls
cat
ps
A Linux command displaying an absolute path to (i.e. full filename of) the current working directory is called:
mv
pwd
rm
dir
What is the name of a Linux command used for renaming files and directories?
rm
ps
mv
ls
Which of the Linux command-line commands listed below is used for directory creation?
touch
cd
mkdir
create
What is a characteristic of a hard link in a Linux file system?
It can link to files in different file systems
It has a different inode number than the original file
It has the same inode number than the original file
It breaks when the original file is deleted
What is a characteristic of a soft link (symbolic link) in a Linux file system?
It can link to files across different file systems
It has the same inode number as the original file
It increases the link count of the original file
It remains valid if the original file is deleted
What is the correct syntax for creating a symbolic link in Linux
ln original_file symbolic_link_name
ln -s original_file symbolic_link_name
ln -l symbolic_link_name original_file
ln -l original_file symbolic_link_name
What directory contains files related to booting the system.
/boot
/dev
/proc
/sys
What directory contains mostly plaintext configuration files for the system?
/tmp
/var
/dev
/etc
What directory contains system binaries meant for administrators?
/bin
/var/run
/dev/null
/usr/sbin
Where do removable automount devices get mounted?
/mnt
/boot
/home
/media
What directory contains things like logs and databases and is, therefore, often put on its own drive or partition?
/proc
/tmp
/var
/usr
What directory is the kernel stored in?
/var/kern
/etc/linux
/dev
/boot
Where is a standard user's home directory located?
/home/user_name
/user_name
/var/user_name
/Users/user_name
Where is the super user's home directory located?
/
/root
/home/root
/etc/root
Which directory contains installed software programs and libraries?
/dev
/soft
/usr
/etc
What is the name for the full path to a directory or file?
Recursive Path
Relative Path
Absolved Path
Absolute Path
What is the topmost level directory ( / ) on Linux called?
home
trunk
root
foot
What single character can be used to refer to the active user's home directory?
^
$
~
there is none
What command is used to move between directories at the Linux terminal or console?
mv
cd
pwd
rd
What command can be used to show the absolute path to the directory that you are currently in?
pcd
ppd
pud
pwd
If I am in the /home/tator directory and run the command cp Desktop/file1.txt Desktop/file2.txt I am using what type of path for the files?
Parent
Absolute
Relative
Cousin
What command can be used to move to the parent of the current directory?
cd .
cd ..
cd ...
upone
Type the command to perform an action as super user
(a)
What makes a file or folder hidden on Linux?
the -h attribute
having a period ( . ) at the beginning of its name
the "hidden" command
no files or folders can be hidden on Linux
What directory is the kernel stored in?
/var/kern
/etc/linux
/dev
/boot
What does the 'r' permission stand for in Linux file permissions?
Rename
Read
Run
Remove
Which command is used to change file permissions in Linux?
chown
chmod
chgrp
chperm
In the octal representation of permissions, what does the number '7' represent?
Read and write
Read, write, and execute
Write and execute
Execute only
If a file has permissions set to 644, what permissions does the group have?
Read and write
Read only
Write only
Execute only
How would you change the permissions of a file to allow the owner to read and write, the group to read, and others to have no permissions using chmod?
chmod 640 filename
chmod 750 filename
chmod 644 filename
chmod 600 filename
Explain the significance of the three sets of permissions in Linux file systems.
They determine the file size.
They control who can read, write, or execute the file.
They define the file type.
They set the file's creation date.
A file has permissions set to 755. What does this mean for the 'others' category?
No permissions
Read and execute
Read, write, and execute
Write and execute
Why might a system administrator choose to set a directory's permissions to 700?
To allow everyone to access the directory
To restrict access to only the owner
To allow group members to modify the directory
To make the directory read-only for everyone
How would you verify the current permissions of a file named 'document.txt'?
ls -l document.txt
chmod document.txt
chown document.txt
chgrp document.txt
Which chmod command sets the "other" permissions on a file to read, write, and execute?
A) chmod 776 file
B) chmod 777 file
C) chmod 775 file
D) chmod 774 file
What does the chmod command do?
What does the command "su" do when executed in a terminal?
A. Switches to the root user without changing the current directory.
B. Switches to the root user and changes to the root user's home directory.
C. Switches to the specified user without changing the current directory.
D. Switches to the specified user and keeps the environment variables unchanged.
Explain the significance of the three sets of permissions in Linux file systems.
They determine the file size.
They control who can read, write, or execute the file.
They define the file type.
They set the file's creation date.
What does the command su - do when executed in a terminal?
A. Switches to the root user without changing the current directory.
B. Switches to the root user and changes to the root user's home directory.
C. Switches to the specified user without changing the current directory.
D. Switches to the specified user and keeps the environment variables unchanged.
What is utility is a menu-driven program that is used to create, modify, or delete partitions on a storage drive?
mkdir
fdisk
mkfs
chown
The command is used to build a Linux file system on a device, which is usually a drive partition
chmod
mkdir
mkfs
htop
Where is a configuration file that stores information about storage devices and partitions and where and how the partitions should be mounted.
/mnt/sdb
/etc/mnt
/mnt/data
/etc/fstab
What does LVM stand for?
Logical Volume Master
Logical Volume Manager
Logic Volume Manage
Logical Virtual Manager
What directory contains files related to booting the system.
/boot
/dev
/proc
/sys
What directory contains mostly plaintext configuration files for the system?
/tmp
/var
/dev
/etc
Which directory contains installed software programs and libraries?
/dev
/soft
/usr
/etc
What is the purpose of the mkfs command in Linux?
To create, modify, or delete partitions
To update the kernel with changes in the partition table
To build a Linux file system on a specified device
To list existing partitions
Which protocol enables file sharing between systems on a network and is commonly used in Unix and Linux environments?
Network File System (NFS)
Server Message Block (SMB)
Common Internet File System (CIFS)
mdadm
Which filesystem offers built-in capabilities for copy-on-write, snapshots, pooling, and logical volumes?
XFS
EXT4
btrfs
JFS
Which of the following directories is specified by Filesystem Hierarchy Standard (FHS) as a mount point for removable media, such as USB storage media, DVDs, and CD-ROMs?
/media
/mnt
/mount
/
You have partitioned and formatted a new sdc hard drive. You want to mount the first partition on sdc to directory /mnt/newdisk.
Which command will perform the mount correctly?
mount /dev/sdc1 /mnt/newdisk
mount /dev/sdc /mnt/newdisk
mount /mnt/newdisk /dev/sdc1
mount /sdc1 /mnt/newdisk
A number of new file systems have been added to a Linux server and you want to activate them. You also do not want to bring the server down.
What command will activate the file systems without bringing the server down?
mount -r
mount -a
init q
mount -t
Which of the following commands shows the number of inodes, number of free inodes, and number of used inodes?
What command would you enter at the command prompt to list all files and directories in a directory, along with file size and the total amount of space taken up by the directory?
ls -l
df -h
find
du -ac
Which command do you use to verify the integrity of a filesystem?
What does the command edquota used for?
Which of the following commands displays the disk usage and quota limits for the development group?
Which command displays a summary of the disc usage and quotas for the specified file systems, including the specific number of files and space by user.
repquota
quota
Choose the BEST explaination about ~/ .bash_profile
It is the online help for Linux command
It is executed once the user log in and then receives the shell
It is a database of the installed shell
What is the primary function of the Linux kernel?
Run applications
Manage system resources
Connect to the internet
Provide a graphical user interface
What does the 'echo' command do in Linux?
Display a message
Change the password
List files in a directory
Show system information
Where are system-wide configuration files typically stored in a Linux system?
/bin
/etc
/lib
/tmp
Which command displays the current username?
whoami
id -u
echo $USER
logname
Which commands show your current shell type?
echo $0
echo $SHELL
bash
echo /$0
What is the default shell used in most Linux distributions?
bash
zhh
chs
sh
Which command allows you to switch users without logging out
uname
uname -i
su
pwd
Which command prints system information?
su -i
uname
whoami
exec
How do you see the list of commands that have been run on the system?
chsh
clear
hist -a
history
How do you change the default shell for a user?
chsh -u
chsh -s /bin/ksh [username]
chsh -s /bin/ksh -all
csh -s /bin/ksh [username]
How is export used in linux?
If your shell window looks like this picture. Which two commands will display the content of the "hosts" file on your screen (stdout)?
cat hosts
cat /etc/hosts
ls hosts
ls -l hosts
What is a variable?
A fixed value in a program
A storage location identified for data that can change
A type of hardware component
A constant in mathematics
What does an environment variable provide?
Hardware specifications
Network configurations
Settings and configurations
User interface design
What is a shell variable?
A variable inherited by child shells and processes
A variable that is not inherited by child shells and processes
A variable used in web development
A variable that stores user passwords
What is a local variable?
A variable that is always available
A variable defined in scripts and script functions
A variable used for network settings
A variable that stores system logs
What does the HISTSIZE variable determine?
The size of the user's home directory
The number of lines or commands stored in a history list
The number of active users
The size of the system memory
What does OLDPWD represent?
The current working directory
The previous directory the user accessed
The user's password
The user's email address
What does the HISTFILE variable store?
User passwords
Past commands
User emails
System logs
Which variable is typically defined in scripts and does not exist after the script is run?
Environment variable
Shell variable
Local variable
User variable
What does the command `export [name]=[value]` do?
Deletes an environment variable.
Creates a new environment variable.
Lists all environment variables.
Displays the value of a variable.
How does the command `echo $[name]` function in a shell?
Deletes a variable.
Displays the contents of a variable.
Creates a new variable.
Lists all variables.
What is the function of the `env` or `printenv` command?
Deletes environment variables.
Displays current environment variables and their values.
Creates new environment variables.
Modifies existing environment variables.
What does the `set` command do in a shell environment?
Deletes all variables.
Displays a list of all variables and functions.
Creates a new shell function.
Modifies the shell prompt.
What is the purpose of the `unset [name]` command?
Creates a new variable.
Displays the value of a variable.
Removes a variable and its value.
Lists all environment variables.
What does impact does modifying /etc/profile have in a shell environment?
In a Linux system, how can you list all groups a user belongs to?
groups username
listgroups username
usergroups username
showgroups username
Which Linux command allows you to see a list of previously used commands?
What does GNU do?
What does an asterisk (*) mean in Linux?
How do you determine the size of a file in Linux?
How do you run jobs in foreground?
How do you run jobs in the background?
How do you monitor active processes in Linux?
tskmgr
ping
chmod
top
When using vi, how do you insert new information into a file?
press x
press i
press s
press d
Which command in Linux opens the boot log file?
In Linux, when would you use cpio?
