Linux Flashcards
- Bundling utilities, management tools, and application software with a Linux kernel is called a:
A distribution of Linux
- To display your current location within the filesystem, you can type:
pwd
- Long command options are preceded by which two characters?
–
- The ______ command will display your current working directory.
pwd
- To see a list of commands that are available while viewing a man page, you can type the __ character.
h
- Environment variables are:
Passed into other shells and commands
- If you want to delete a variable, you can run:
unset
- Local variables are:
Only available to the shell they are created in
- Shell variables are used to:
Hold critical system information
- The /sbin directory contains:
Essential administrative commands
- To view all current variables, you can use:
set
- Which file can you place in your home directory to be executed when you log off the system?
~/.bash_logout
- Which file is for all bash shell users and executed every time a bash shell is opened?
/etc/bashrc
- Which file is for all bash shell users and executed only at login?
/etc/profile
- What command will create a variable?
variable=value
- Which command will display more information about globbing?
man 7 glob
- The glob pattern [a-d] would match:
A file name with a single character that is either a a, b, c, or d.
- The period . character in the output of the ls command represents:
The current directory
- Which command is used to perform a long listing to show file details?
ls -l
- Which character at the beginning of a long listing indicates a directory?
d
- The FHS sets which standard?
Which directories should be used to hold specific files
- What directory is used as a temporary mount point?
/mnt
- Which directory represents the root of the filesystem hierarchy?
/
- Which directory is used to store user home directories?
/home
- Which directory is used for the home directory of the root user?
/root
- If you want to see the entire contents of a text file, you can use the _____ command:
cat
- The head -n -1 readme.txt command will:
Display all but the last line of readme.txt
- Which command will merge two files together line by line?
paste
- If you want to break apart a large file into smaller files, you can use:
split
- If you want a file to be displayed with its lines numbered, you can use:
nl
- Which command can be used to scroll through a text file?
less
- The regular expression a is equivalent to:
a{0,}
- What does the vertical bar | character do in a regular expression?
Separates alternative patterns that can be matches
- Which regular expression character matches any one character?
.
- If you are in the vi command mode and want to begin inserting text before your cursor, you can type:
i
- If you are in vi command mode and want to add a new line after your cursor, you can type:
o
- If you want to move a character to the right in vi command mode, you can press the Right Arrow Key or:
l
- To perform cut and paste in a vi document, you actually do:
delete and put
- To save and then quit, you can type in command mode:
ZZ
- If you want to append content to a file with the normal output of a command, you can use:
> >
- This stream is the output of a command operating normally:
stdout
- Two or more commands combined with the vertical bar | character between them form a:
pipeline
- A popular program for monitoring running processes in real-time is:
top
- The _____ command will list the commands that are running in your terminal.
ps
- The key press combination that will request a process to stop is:
CTRL+C
- To change the niceness value of an existing process, you can use the _____ command.
renice
- To execute a command with the default priority, which value do you pass to the nice command?
0
- To see how long the system has been running, you can use the _____ command.
uptime
- To see the list of background processes that you have started in your shell, you can run:
jobs
- To send a signal to a set of processes with the same name, you can run:
killall
- To view statistics on memory availability, you can use:
free
- By default, tar will attempt to extract an archive…
into the working directory.
- To decompress the archive example.gz, use the following command:
gunzip example.gz
- For the rwxr-x–x permission set, the highlighted permissions belong to:
The user owner of the file
- The command, chmod u=g will:
Set the user owners permissions to match the group owners permission
- The group ownership of a file may only be changed by:
Both the root user and the owner of the file
- The only person who can change the user ownership of a file is:
The root user
- The setuid permission on a file:
Causes the file to run under the owner’s identity
- Which command can be used to set what your default permissions will be on new files?
umask
- Which command can change the user owner of a file?
chown
- Which command is used to change permissions on a file?
chmod
- Which command will allow you to change the group ownership of a file that you own?
chgrp
- What permissions are typically placed on soft link files?
rwxrwxrwx
- Which type of link can be made to directories, hard or soft?
soft
- A device name of /dev/hda1 indicates this partition is on which type of device?
IDE
- A mount point is:
An empty directory that is used to access a filesystem
- By default, the df command displays filesystem use in:
1-K block size
- Inodes are used to store a file’s:
Metadata
- The _____ command will display how much space a directory is using.
du
- Missing files don’t have their original file names, instead they are named with their _____ number?
inode
- How can you remove a package using an rpm command?
rpm -e
- If a library is not accessible due to an error, the ldd would report which error message?
not found
- What are benefits of a shared library:
Programs use a more consistent base of code
- What command will find and load shared libraries when a program is executed?
The dynamic linker
- Which command will create disk labels on an ext3 filesystem?
e2label
- Which command will describe the mount options available for different filesystems?
man mount
- Which file provides persistent mapping of block devices to mount points?
/etc/fstab
- What is the primary configuration file for yum?
/etc/yum.d/yum.conf
- Which command will show the dependencies of an RPM package?
rpm -qpR
- In which file are repositories stored for Debian package management?
/etc/apt/sources.list
- Which command may be used to get a list of the installed Debian packages?
dpkg -l
- Which command will remove all files that belong to a Debian package?
apt-get purge
- Which command will update the list of available packages for APT?
apt-get update
- Which utility can automate changes needed for a base virtual machine image?
cloud-init