Linux Flashcards
1
Q
- Bundling utilities, management tools, and application software with a Linux kernel is called a:
A
A distribution of Linux
2
Q
- To display your current location within the filesystem, you can type:
A
pwd
3
Q
- Long command options are preceded by which two characters?
A
–
4
Q
- The ______ command will display your current working directory.
A
pwd
5
Q
- To see a list of commands that are available while viewing a man page, you can type the __ character.
A
h
6
Q
- Environment variables are:
A
Passed into other shells and commands
7
Q
- If you want to delete a variable, you can run:
A
unset
8
Q
- Local variables are:
A
Only available to the shell they are created in
9
Q
- Shell variables are used to:
A
Hold critical system information
10
Q
- The /sbin directory contains:
A
Essential administrative commands
11
Q
- To view all current variables, you can use:
A
set
12
Q
- Which file can you place in your home directory to be executed when you log off the system?
A
~/.bash_logout
13
Q
- Which file is for all bash shell users and executed every time a bash shell is opened?
A
/etc/bashrc
14
Q
- Which file is for all bash shell users and executed only at login?
A
/etc/profile
15
Q
- What command will create a variable?
A
variable=value
16
Q
- Which command will display more information about globbing?
A
man 7 glob
17
Q
- The glob pattern [a-d] would match:
A
A file name with a single character that is either a a, b, c, or d.
18
Q
- The period . character in the output of the ls command represents:
A
The current directory
19
Q
- Which command is used to perform a long listing to show file details?
A
ls -l
20
Q
- Which character at the beginning of a long listing indicates a directory?
A
d
21
Q
- The FHS sets which standard?
A
Which directories should be used to hold specific files
22
Q
- What directory is used as a temporary mount point?
A
/mnt
23
Q
- Which directory represents the root of the filesystem hierarchy?
A
/
24
Q
- Which directory is used to store user home directories?
A
/home
25
Q
- Which directory is used for the home directory of the root user?
A
/root
26
Q
- If you want to see the entire contents of a text file, you can use the _____ command:
A
cat
27
Q
- The head -n -1 readme.txt command will:
A
Display all but the last line of readme.txt
28
Q
- Which command will merge two files together line by line?
A
paste
29
Q
- If you want to break apart a large file into smaller files, you can use:
A
split
30
Q
- If you want a file to be displayed with its lines numbered, you can use:
A
nl
31
Q
- Which command can be used to scroll through a text file?
A
less
32
Q
- The regular expression a is equivalent to:
A
a{0,}
33
Q
- What does the vertical bar | character do in a regular expression?
A
Separates alternative patterns that can be matches