Linux Flashcards

1
Q
  1. Bundling utilities, management tools, and application software with a Linux kernel is called a:
A

A distribution of Linux

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  1. To display your current location within the filesystem, you can type:
A

pwd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
  1. Long command options are preceded by which two characters?
A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
  1. The ______ command will display your current working directory.
A

pwd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
  1. To see a list of commands that are available while viewing a man page, you can type the __ character.
A

h

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
  1. Environment variables are:
A

Passed into other shells and commands

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  1. If you want to delete a variable, you can run:
A

unset

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
  1. Local variables are:
A

Only available to the shell they are created in

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
  1. Shell variables are used to:
A

Hold critical system information

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
  1. The /sbin directory contains:
A

Essential administrative commands

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
  1. To view all current variables, you can use:
A

set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
  1. Which file can you place in your home directory to be executed when you log off the system?
A

~/.bash_logout

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
  1. Which file is for all bash shell users and executed every time a bash shell is opened?
A

/etc/bashrc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
  1. Which file is for all bash shell users and executed only at login?
A

/etc/profile

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
  1. What command will create a variable?
A

variable=value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
  1. Which command will display more information about globbing?
A

man 7 glob

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q
  1. The glob pattern [a-d] would match:
A

A file name with a single character that is either a a, b, c, or d.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q
  1. The period . character in the output of the ls command represents:
A

The current directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q
  1. Which command is used to perform a long listing to show file details?
A

ls -l

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q
  1. Which character at the beginning of a long listing indicates a directory?
A

d

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q
  1. The FHS sets which standard?
A

Which directories should be used to hold specific files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q
  1. What directory is used as a temporary mount point?
A

/mnt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q
  1. Which directory represents the root of the filesystem hierarchy?
A

/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q
  1. Which directory is used to store user home directories?
A

/home

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q
  1. Which directory is used for the home directory of the root user?
A

/root

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q
  1. If you want to see the entire contents of a text file, you can use the _____ command:
A

cat

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q
  1. The head -n -1 readme.txt command will:
A

Display all but the last line of readme.txt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q
  1. Which command will merge two files together line by line?
A

paste

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q
  1. If you want to break apart a large file into smaller files, you can use:
A

split

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q
  1. If you want a file to be displayed with its lines numbered, you can use:
A

nl

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q
  1. Which command can be used to scroll through a text file?
A

less

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q
  1. The regular expression a is equivalent to:
A

a{0,}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q
  1. What does the vertical bar | character do in a regular expression?
A

Separates alternative patterns that can be matches

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q
  1. Which regular expression character matches any one character?
A

.

35
Q
  1. If you are in the vi command mode and want to begin inserting text before your cursor, you can type:
A

i

36
Q
  1. If you are in vi command mode and want to add a new line after your cursor, you can type:
A

o

37
Q
  1. If you want to move a character to the right in vi command mode, you can press the Right Arrow Key or:
A

l

38
Q
  1. To perform cut and paste in a vi document, you actually do:
A

delete and put

39
Q
  1. To save and then quit, you can type in command mode:
A

ZZ

40
Q
  1. If you want to append content to a file with the normal output of a command, you can use:
A

> >

41
Q
  1. This stream is the output of a command operating normally:
A

stdout

42
Q
  1. Two or more commands combined with the vertical bar | character between them form a:
A

pipeline

43
Q
  1. A popular program for monitoring running processes in real-time is:
A

top

44
Q
  1. The _____ command will list the commands that are running in your terminal.
A

ps

45
Q
  1. The key press combination that will request a process to stop is:
A

CTRL+C

46
Q
  1. To change the niceness value of an existing process, you can use the _____ command.
A

renice

47
Q
  1. To execute a command with the default priority, which value do you pass to the nice command?
A

0

48
Q
  1. To see how long the system has been running, you can use the _____ command.
A

uptime

49
Q
  1. To see the list of background processes that you have started in your shell, you can run:
A

jobs

50
Q
  1. To send a signal to a set of processes with the same name, you can run:
A

killall

51
Q
  1. To view statistics on memory availability, you can use:
A

free

52
Q
  1. By default, tar will attempt to extract an archive…
A

into the working directory.

53
Q
  1. To decompress the archive example.gz, use the following command:
A

gunzip example.gz

54
Q
  1. For the rwxr-x–x permission set, the highlighted permissions belong to:
A

The user owner of the file

55
Q
  1. The command, chmod u=g will:
A

Set the user owners permissions to match the group owners permission

56
Q
  1. The group ownership of a file may only be changed by:
A

Both the root user and the owner of the file

57
Q
  1. The only person who can change the user ownership of a file is:
A

The root user

58
Q
  1. The setuid permission on a file:
A

Causes the file to run under the owner’s identity

59
Q
  1. Which command can be used to set what your default permissions will be on new files?
A

umask

60
Q
  1. Which command can change the user owner of a file?
A

chown

61
Q
  1. Which command is used to change permissions on a file?
A

chmod

62
Q
  1. Which command will allow you to change the group ownership of a file that you own?
A

chgrp

63
Q
  1. What permissions are typically placed on soft link files?
A

rwxrwxrwx

64
Q
  1. Which type of link can be made to directories, hard or soft?
A

soft

65
Q
  1. A device name of /dev/hda1 indicates this partition is on which type of device?
A

IDE

66
Q
  1. A mount point is:
A

An empty directory that is used to access a filesystem

67
Q
  1. By default, the df command displays filesystem use in:
A

1-K block size

68
Q
  1. Inodes are used to store a file’s:
A

Metadata

69
Q
  1. The _____ command will display how much space a directory is using.
A

du

70
Q
  1. Missing files don’t have their original file names, instead they are named with their _____ number?
A

inode

71
Q
  1. How can you remove a package using an rpm command?
A

rpm -e

72
Q
  1. If a library is not accessible due to an error, the ldd would report which error message?
A

not found

73
Q
  1. What are benefits of a shared library:
A

Programs use a more consistent base of code

74
Q
  1. What command will find and load shared libraries when a program is executed?
A

The dynamic linker

75
Q
  1. Which command will create disk labels on an ext3 filesystem?
A

e2label

76
Q
  1. Which command will describe the mount options available for different filesystems?
A

man mount

77
Q
  1. Which file provides persistent mapping of block devices to mount points?
A

/etc/fstab

78
Q
  1. What is the primary configuration file for yum?
A

/etc/yum.d/yum.conf

79
Q
  1. Which command will show the dependencies of an RPM package?
A

rpm -qpR

80
Q
  1. In which file are repositories stored for Debian package management?
A

/etc/apt/sources.list

81
Q
  1. Which command may be used to get a list of the installed Debian packages?
A

dpkg -l

82
Q
  1. Which command will remove all files that belong to a Debian package?
A

apt-get purge

83
Q
  1. Which command will update the list of available packages for APT?
A

apt-get update

84
Q
  1. Which utility can automate changes needed for a base virtual machine image?
A

cloud-init