MODULE 5- Command line skills Flashcards
Which program receives user-entered commands in a terminal and translates them into actions for the operating system?
The shell, which interprets commands typed at the terminal and executes them.
Which shell is the most commonly used one on Linux distributions and supports features like command history and inline editing?
The Bash shell (Bourne Again SHell).
Which shell feature allows a user to run an entire series of commands from a text file, including logic and functions?
Scripting, which allows commands and logic to be executed from a file.
Which shell feature allows creating nicknames for long or frequently-used commands?
Aliases, which act as shortcuts for longer commands.
Which shell feature lets users and the system store information such as settings or data used during command execution?
Variables, which can store and retrieve information in the shell environment.
Which term refers to a software program that performs an action when executed on the command line?
A command.
Which command, when run with no options or arguments, lists the files and directories in the current working directory?
ls
In the command syntax command [options] [arguments], which part is used to change how the command behaves?
Options
In the command syntax command [options] [arguments], which part provides extra information like filenames or usernames?
Arguments.
Which rule must always be followed when entering commands, filenames, or variables in a Linux terminal?
Linux is case-sensitive—inputs must be typed exactly as shown.
Which symbol in the CLI represents the user’s home directory ?
The ~ symbol.
How can you list the contents of both /etc/ppp and /etc/ssh in one command?
ls /etc/ppp /etc/ssh
Which option of the ls command displays a long listing format with file permissions, ownership, and size?
-l
Which option causes the ls command to reverse the order of the listing?
-r
What does the command ls -lr display?
A long listing of files in reverse alphabetical order.
What is the output of ls -lh /usr/bin/perl compared to ls -l /usr/bin/perl?
It shows the file size in human-readable format (e.g., 11K instead of 10376).
What is the long-form equivalent of the -h option in ls?
(- -human-readable
Which key can you press to cycle backward through previously executed commands?
Up Arrow (↑).
Which command displays the list of commands executed in the current terminal session?
history
Which keys allow editing of a recalled command by moving the cursor left or right?
Left Arrow (←) and Right Arrow (→).
What command would display the last 3 commands executed in a session?
history 3
Which symbol is used to re-execute a command by referencing its number in the history list?
! (exclamation mark).
Which command would Re-execute command number 3 from the history list?
!3
Which command would Re-execute the third command from the bottom of the history list?
!-3