NEW
Font size
WorksheetsCommand Line Usage Quiz
Total questions: 40
Worksheet time: 20mins
What is the shell in the context of command line usage?
A graphical user interface
A program that takes keyboard commands and passes them to the operating system
A type of hardware component
A network protocol
What does "bash" stand for?
Basic Shell
Bourne Again SHell
Binary Access Shell
Built-in Advanced Shell
What is a terminal emulator used for?
To play video games
To interact with the shell using a graphical user interface
To edit images
To browse the internet
What does a shell prompt typically include?
The current time and date
The username and machine name, followed by the current working directory and a dollar sign
A list of installed programs
The system's IP address
What does a pound sign ("#") at the end of a shell prompt indicate?
The system is offline
The terminal session has superuser privileges
The shell is in sleep mode
The shell is running a script
What is the function of the up-arrow key in the command line interface?
It deletes the previous command.
It repeats the last command entered.
It opens a new terminal window.
It saves the current command.
What is the term used for the feature that allows recalling previous commands in the terminal?
Command recall
Command memory
Command history
Command storage
Which key combination is NOT used for copying and pasting in the terminal window?
Ctrl-c and Ctrl-v
Middle mouse button
Left mouse button and drag
Double-clicking a word
What is the focus policy setting that requires clicking on a window to make it active?
Focus follows mouse
Click to focus
Hover to focus
Auto-focus
Which command is used to display the current time and date in Linux?
cal
df
date
free
What does the 'cal' command display by default?
Current time and date
Calendar of the current month
Amount of free disk space
Amount of free memory
Which command is used to see the current amount of free space on disk drives?
free
df
date
cal
To display the amount of free memory, which command should be used?
df
cal
date
free
How can you end a terminal session in Linux?
By closing the terminal emulator window
By pressing Ctrl+Alt+F1
By entering the command 'start'
By pressing Alt+F7
What command can be used to end a terminal session at the shell prompt?
start
exit
close
shutdown
What key combination allows you to switch from one virtual console to another in Linux?
Alt+F7
Ctrl+Alt+F1
Alt+F1-F6
Ctrl+F7
Which command is used to print the name of the current working directory in Linux?
cd
ls
pwd
dir
What does the 'cd' command do in a Linux system?
List directory contents
Change directory
Print name of current working directory
Create a new directory
What is the first directory in a hierarchical directory structure called?
Root directory
Main directory
Base directory
Top directory
In Unix-like systems, how many file system trees are there regardless of the number of storage devices?
One
Two
Three
Four
Who is responsible for attaching storage devices at various points on the file system tree?
System administrator
File manager
Network administrator
Database administrator
Which command is used to display the current working directory?
ls
cd
pwd
mkdir
What is the initial directory set when a user logs into the system?
Root directory
Home directory
Bin directory
Temp directory
Which command is used to list the contents of a directory?
pwd
ls
cd
rm
What is an absolute pathname?
A pathname that starts from the current directory
A pathname that starts from the home directory
A pathname that starts from the root directory
A pathname that starts from the bin directory
What does the command `pwd` do in a Linux terminal?
Changes the current directory
Lists all files in the directory
Displays the current working directory
Deletes files in the directory
What is the symbol used to represent the parent directory in a relative pathname?
.
..
/
~
Which command would you use to change the directory to `/usr` using a relative pathname?
cd /usr
cd ..
cd /usr/bin
cd ~
What is the difference between an absolute pathname and a relative pathname?
Absolute pathnames start from the root directory, while relative pathnames start from the working directory.
Absolute pathnames use special symbols, while relative pathnames do not.
Absolute pathnames are shorter than relative pathnames.
Absolute pathnames are used only in Windows, while relative pathnames are used in Linux.
What command changes the working directory to your home directory in Linux?
cd ~
cd /
cd ..
cd bin
How can you change the working directory to the home directory of a specific user named "bob"?
cd /bob
cd ~bob
cd bob/
cd /home/bob
What is the result of using the command "cd -" in Linux?
Changes to the root directory
Changes to the previous working directory
Changes to the home directory
Changes to the bin directory
Which of the following commands is equivalent to "cd ./bin"?
cd bin
cd /bin
cd ../bin
cd bin/
What happens to filenames that begin with a period character in Linux?
They are automatically deleted.
They are hidden and not listed unless specified.
They are converted to uppercase.
They are moved to a special folder.
How does Linux treat filenames in terms of case sensitivity?
Linux treats all filenames as lowercase.
Linux treats all filenames as uppercase.
Linux is case sensitive, treating 'File1' and 'file1' as different files.
Linux ignores case sensitivity in filenames.
What is a key difference between Linux and some other operating systems regarding file extensions?
Linux requires file extensions for all files.
Linux does not use file extensions to determine file type.
Linux only uses .txt as a file extension.
Linux automatically adds extensions to files.
What should you avoid when creating filenames in Linux?
Using numbers.
Using spaces.
Using lowercase letters.
Using underscores.
Which command is used to list all files and directories in the current directory?
ls
cd
mkdir
rm
What is the command to create a new directory in Linux?
rm
touch
mkdir
rmdir
Which command is used to remove a file in Linux?
cp
rm
touch
mv
