Linux Basic Commands – Full Quiz
← Back to Quiz Home
This quiz contains 20 questions covering basic Linux commands every DevOps engineer must know.
It is designed for practice, revision, and interview preparation .
Which command prints the current working directory?
The pwd (Print Working Directory) command displays the full absolute path of the current directory you are in.
Which command lists files in the current directory?
The ls (list) command displays files and directories within the current directory.
Which option with ls shows files in long format?
The -l (long listing) option provides detailed information including permissions, owner, size, and modification date.
Which option with ls shows hidden files?
The -a (all) option lists all files, including hidden files that start with a dot (.).
In Linux, hidden files start with which character?
Files and directories starting with a dot (.) are hidden by default and are not shown by a standard ls command.
Which command is used to change directories?
The cd (change directory) command is used to navigate between different directories in the filesystem.
The .. symbol represents the parent directory, so cd .. moves you up one level in the directory tree.
Which command takes you directly to the home directory?
The ~ (tilde) symbol represents the current user's home directory.
Which path starts from the root directory /?
An absolute path always starts from the root directory (/) and specifies the complete location of a file or directory.
Which path depends on the current directory?
A relative path describes the location of a file or directory relative to the current working directory.
Which command displays the contents of a file?
The cat (concatenate) command reads a file and outputs its entire content to the terminal.
Which command is commonly used to view short text files?
cat is efficient for viewing short files, as it dumps the whole content at once. For larger files, less or more is preferred.
pwd stands for Print Working Directory .
Which command lists files including hidden ones in long format?
ls -la combines -l (long format) and -a (all files, including hidden) to show detailed info for every file.
Which command shows files and directories in the current location?
ls is the standard command to list directory contents.
Which directory symbol represents the current directory?
The single dot . represents the current directory in Linux paths.
Which directory symbol represents the parent directory?
The double dot .. represents the parent directory (one level up).
Which command prints the Linux OS information file?
The /etc/os-release file contains operating system identification data, and cat displays it.
Which of the following is NOT a Linux command?
dirlist is not a standard Linux command. ls is used for listing directories.
Which command helps verify where you are in the filesystem?
pwd confirms your current location in the directory structure.
Quiz Progress
0 / 0 questions answered
(0% )
0 correct
Quiz Complete!
0%
Reset quiz
📚 Study Guides
📬 Weekly DevOps, Cloud & Gen AI quizzes & guides