MODULE 7 - Navigating the Filesystem Flashcards
Which command would you use to view the contents of the top-level directory in Linux?
ls /
How can you refer to the home directory of a user named bob from the command line, without typing the full path?
Use ~bob, which expands to /home/bob.
Which structure defines how files and directories are organized across all Linux systems?
The Filesystem Hierarchy Standard (FHS)
What does the command cd do when run without any arguments?
It takes the user back to their home directory.
Which command would you run to display the path of your current location in the Linux filesystem?
pwd
Which command is used to navigate from one directory to another in the Linux shell?
The cd (change directory) command.
What command moves a user from /home/sysadmin/Documents back up one level to /home/sysadmin?
cd ..
What type of path begins with the / character and always starts from the root directory?
An absolute path.
What is defined as is a list of directories separated by slashes / that describes the location of a file or directory within the filesystem?
A path
Which type of path gives directions starting from the current working directory?
A relative path.
What is the key difference in how absolute and relative paths begin?
Absolute paths start with /; relative paths do not.
Which command lets the user confirm their current location in the filesystem?
pwd (print working directory)
What does the command cd ../.. do from any location?
It moves the user up two levels in the directory hierarchy.
Which shortcut always represents the current directory?
The single dot . represents the current directory.
Which command is used to list the contents of a directory in Linux?
ls
Which command reveals whether ls is aliased on the system?
type ls
What is the command to run ls without the color alias?
\ls
Which command reveals all files, including hidden ones, in a directory?
ls -a
Which command displays file metadata such as size, owner, and modification time?
ls -l
What is the purpose of hidden files like .bashrc and .profile?
They are customization files used to configure Linux, the shell, or specific programs.
What file type is represented by the symbol d in ls -l?
A directory.
What file type is represented by - in ls -l?
A regular file (text, binary, image, etc.).
What does the character l represent in the first position of ls -l output?
A symbolic link.
Which file type is used for inter-process communication and is shown as s or p?
s for socket, p for pipe.