Basic Commands Flashcards

1
Q

What command parses the /proc/meminfo file for easier analysis of memory usage statistics?

A

free

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which command displays system usage reports based on data collected from system activity includes type of data and time data was collected?

A

sar

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which command exposes the local clock, the universal time, and the hardware clock?

A

timedatectl

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

which command is used by root to set or reset a password for any user. A user can use this command to reset their own password. what does the option -S do?

A
passwd  -S --status displays 7 fields login name
locked password
date of last change
minimum age
maximum age
warning period
inactivity period
...ages are expressed in days
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

which command is an interface to the system reference manuals? what do the options -k, -K, -f, -t do?

A

man

  • k searches for keywords and displays matches
  • K search for text in all manual pages
  • f =whatis displays a short description from the manual pages
  • t formats in printable format
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

which command displays the amount of disk space available on the file system? Options -h, -i,

A

df -h human readable, -i lists inode information instead of block size

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which command estimates file space usage? Options -h, -c, -a

A

du -h human readable, -c produce a grand total, -a write counts for all files not just directories

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which command reports central processing unit statistics and input/output statistics for devices and partitions

A

iostat

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what is the file extension for kernel module files…often found in /usr/lib/modules/

A

.ko

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the configuration directory/file for modprobe?

A
/etc/modprobe.d = directory          
/etc/modprobe.conf = file
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which command is used to add and remove modules from the Linux Kernel? Options -a, -r

A

modprobe -a = to add modules -r to remove modules

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which command configures kernel parameters at runtime? Options -a, -w, -p, -e, -r

A

sysctl

  • a = display all values currently available -w = when all arguments prescribe a key to be set
  • p = –load - load in sysctl settings from a file specified
  • e ignore errors
  • r only apply settings that match a pattern.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Which command shows the status on modules in the linux kernel and their details?

A

lsmod

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Which command displays information about a particular Linux Kernel module?

A

modinfo

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which command is a simple program to insert a module into the Linux Kernel?

A

insmod

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which command is a simple program to remove a module from the Linux Kernel?

A

rmmod

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Which command generates module.dep and maps files? Creates a list of module dependencies by reading each module under /lib/modules/version.

A

depmod

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Which two commands show a listing of last logged in users? Which one of these shows by default a log of the /var/log/btmp file, which contains all the bad login attempts?

A

last, lastb lastb shows the bad login attempts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Which log file in the /var/log/ directory will give you a complete picture of users logins at which terminals, logouts, system events and current status of the system, system boot time, etc.?

A

/var/log/utmp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Which log file in the directory /var/log/… give historical data of utmp?

A

/var/log/wtmp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Which log file in /var/log/… records only failed login attempts?

A

/var/log/btmp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What does sda1 mean?

A

sd = SCSI/SATA, a = first whole drive, 1 = first partition on drive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What are the common file attributes a, A, e, i

A
a = file can only be opened in append mode
A = file can be opened without changing its atime (last opened time)
e = file is using extents for mapping blocks on disk
i = immutable cannot be deleted or renamed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

which command repeats input back to user?

A

echo

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Which command lists contents of directory?

A

ls

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Which command displays the current working directory?

A

pwd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

which command changes the current working directory?

A

cd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

which command updates timestamp of file or creates file?

A

touch

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

which command copies a file or directory?

A

cp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

which command creates a new directory?

A

mkdir or newdir

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

which command shows contents of a file on screen?

A

cat

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

which command breaks output into pages?

A

less

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

Name three popular text editors?

A

vim, nano, gedit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

What are the differences between shutdown -h now, shutdown -h -t 90, and shutdown -r now?

A
  • h now = shutdown now
  • h -t 90 = shutdown in 90 seconds
  • r now = reboots with no delay
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

Which command switches user?

A

su

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

Which command outputs a list of recently entered commands?

A

history

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

What is a feature in which a command-line shell fills in the name of a command you’ve partially typed?

A

tab completion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

Which command clears the screen?

A

clear or ctrl + l

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

Which command searches the NAME section of man pages based on keyword? Helps to find the correct command to use for a certain task.

A

apropos

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

Which command displays a brief description of a given command? Helps to figure out what the command does.

A

whatis

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

Which command displays the info page of a command? Similar to man pages with some improvements, but is not as widely adopted as man pages.

A

info

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

Which command displays a quick summary of command usage and arguments?

A

–help

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

What is the directory of documentation for software packages? includes author, licensing, installation, README, etc.

A

/usr/share/doc/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

What are some examples of interactive online sources of help?

A

Usenet newsgroups, mailing lists, Q&A websites, Forums and social media

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

What is an object that represents a person’s identity to the operating system and is used to perform certain tasks?

A

user account

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

What are the three types of user accounts?

A

Root user, Standard user, Service user

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

What is the term for the local administrative account on a Linux system, typically named root?

A

superuser

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

What is a best practice that states that users should have as much access as is required to do their job, but no more that that?

A

Principle of Least Privilege

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q

Which command is used to edit the /etc/sudoers file and cverifies syntax before committing changes and can help correct mistakes before they occur, as mistakes in the sudoers file may render server inoperable.

A

visudo

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
50
Q

Some distros disable root altogether and enable admin privileges by membership to what group? visudo command is used to edit this group’s privileges similar to editing the sudoers file.

A

The wheel group

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
51
Q

Which command creates a user account and configures user settings?

A

useradd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
52
Q

useradd command will do what?

A

create account in /etc/passwd file, references /etc/login.defs, creates user’s home directory in /home/account/, and populates home directory from files in /etc/skel

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
53
Q

What are the functions of the useradd options -c, -e, -s, -D?

A

-c = sets comment field, -e = sets account expiration date, -s = sets user’s default shell, -D = view default config for new users

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
54
Q

/etc/passwd contains what 7 fields separated by colons?

A

User name: Password: UserID: GoupID: Comment: Home directory: Login shell

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
55
Q

What filed contains hashed version of passwords, and who can access it?

A

/etc/shadow root

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
56
Q

Which command controls password expiration, warnings, inactive days, etc.?

A

chage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
57
Q

what are functions of the chage command options -E, -l, -M, -m, -W?

A

-E sets account expiration, -l lists password aging info, -M sets max days password is valid, -m sets minimum days until password can be changed, -W sets number of days before expiration user will be warned

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
58
Q

What is the significance of #chage -M 90 user1

A

sets the maximum days user1’s password is valid to 90 days, performed by root

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
59
Q

Which command modifies settings for regular users?

A

usermod

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
60
Q

What are the functions of the usermod options -c, -e, -aG, -l

A

-c sets comment field, -e sets account expiration date, -aG adds user to group and keeps them in existing groups, -l chages user’s login name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
61
Q

What are two basic ways of locking a user account?

A

passwd -l , usermod -L

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
62
Q

What are two basic ways to unlock a user account?

A

passwd -u , usermod -U

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
63
Q

Which command deletes a user account? However, it does not delete home directory unless you use what option?

A

userdel -r

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
64
Q

What is an access control object that contains multiple users with similar security requirements?

A

Group Account

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
65
Q

What file is the storage location for groups, is commonly referenced for group info, contains four fields separated by colons, and should not be edited manually but rather by group commands?

A

/etc/group

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
66
Q

What are the four fields in the /etc/group file?

A

Group name: password requirement: group ID: group list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
67
Q

Which command creates groups? By default groups have no members or password.

A

groupadd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
68
Q

What are the functions of groupadd options -g, -f, -o?

A

-g assign a group ID, -f exit with success if group already exists, -o allow group creation with non-unique ID

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
69
Q

Which command changes a group’s attributes and edits the /etc/group file?

A

groupmod

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
70
Q

What are the functions of the groupmod command options -g, -n?

A

-g change group ID, -n rename group

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
71
Q

Which command deletes groups from /etc/group file, doesn’t delete users?

A

groupdel

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
72
Q

Which command displays the user name you are currently logged in as?

A

whoami

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
73
Q

Which command determines details of users currently logged in?

A

who

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
74
Q

what are three items that the who command will tell you?

A

user name, system the user is connected to, date/time connected since

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
75
Q

Which command displays details of logged in users and transactions?

A

w

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
76
Q

Which command displays UID/GID? Without options it displays info about logged in user, but you can specify user name to display info about that user.

A

id

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
77
Q

Which file enables customization of user’s environment, is stored in home directory, and is unique to each user? examples include use of aliases, environment variables, and customize command prompt.

A

.bashrc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
78
Q

Which file provides shell configuration for the initial login, but is only read with first login. The default for this file can be provided through /etc/skel/ directory.

A

.bash_profile

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
79
Q

Which directory’s contents are automatically copied to the home directory of new users? the useradd command copies contents from this directory.

A

/etc/skel/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
80
Q

This file provides system-wide environmental variables, it is configured if settings need to apply to all users, it is checked first during login process for shell configs, then user customizations are pulled from .profile in their home directory. Admins can use this file to define global settings, but still allow user-specific customization.

A

/etc/profile

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
81
Q

Which directory is the storage location for scripts used to set system-wide variables?

A

/etc/profile.d/ it is recommended to set variables in scripts here rather than edit /etc/profile

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
82
Q

This file provides system-wide Bash settings? It is different than /etc/profile which is used for variables.

A

/etc/bashrc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
83
Q

What is GPT and what specification is it part of?

A

GUID Partition Table UEFI

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
84
Q

What is MBR and what size is it?

A

Master Boot Record 512 byte-sector in the first sector on the disk

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
85
Q

What is mdadm?

A

mdadm is a Linux utility used to manage and monitor software RAID devices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
86
Q

What is LVM?

A

Logical Volume Management. It is a system of managing logical volumes, or filesystems, that is much more advanced and flexible than the traditional method of partitioning a disk into one or more segments and formatting that partition with a filesystem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
87
Q

What is Multipath?

A

Linux multipath provides a way of organizing the I/O paths logically, by creating a single multipath device on top of the underlying devices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
88
Q

Why is multipathing important?

A

Linux multipathing provides connection fault tolerance and can provide load balancing across the active connections. When multipathing is configured and running, it automatically isolates and identifies device connection failures, and reroutes I/O to alternate connections.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
89
Q

What is the command localectl ?

A

Control the system locale and keyboard layout settings

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
90
Q

fdisk

A

is a dialog-driven program for creation and manipulation of partition tables. It understands GPT, MBR, Sun, SGI and BSD partition tables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
91
Q

what are the three permission attributes for directories and files?

A

r = read, w = write, x = execute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
92
Q

What are the three Permission Contexts?

A

u = Owner, g = Group, o = other

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
93
Q

Which command enables you to modify permissions on files/directories? Can only be done by owner or object or sysadmin.

A

chmod

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
94
Q

chmod -c

A

enables modification of permissions on files/directories, -c report changes made to permissions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
95
Q

chmod -f

A

enables modification of permissions on files/directories, -f hide most error messages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
96
Q

chmod -v

A

enables modification of permissions on files/directories, -v = display diagnostic entry for every object processed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
97
Q

chmod -R

A

enables modification of permissions on files/directories, -R modify permissions recursively

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
98
Q

Which mode of chmod sets permissions using components and operators such as +, -, =?

A

Symbolic Mode + grants permissions, - denies permissions, = assigns permissions exactly as provided

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
99
Q

What does chmod go+rw file1

A

changes permissions for group and others adding read and write permission for file1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
100
Q

In what mode does chmod use octal numbers and shows compete permission as three digit number?

A

Absolute Mode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
101
Q

In Absolute Mode, what do the chmod octal numbers 4, 2, 1 represent?

A

4 = read, 2 = write, 1 = execute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
102
Q

In the Absolute Mode of chmod, what does 764 represent?

A

owner permissions = 7 (4 read + 2 write + 1 execute), group permissions read +write, other permissions read only

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
103
Q

What is the result of chmod 640 file1

A

permissions for file1 are set to owner 6=rw, group = r, others = none (-)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
104
Q

What are the default permissions for riles created by ROOT user? and for directories?

A

644 for files, 755 for directories

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
105
Q

What are the default permissions for files created by REGULAR users? and for directories?

A

664 for files, 775 for directories

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
106
Q

What command alters default permissions on newly created files/directories, can be useful for automating custom permissions for new objects, can be set for session or per-user (in .bashrc), specifies permissions to remove.

A

umask

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
107
Q

system wide umask is set in what two files? Where is the default umask for for a specific user?

A

/etc/basrc /etc/profile for a user = ~/.bashrc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
108
Q

the property by which a user can apply and modify the permissions of a file or directory

A

ownership

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
109
Q

Who can modify permissions for a file or directory?

A

owner & root

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
110
Q

Which command changes the owner, group or both for a file or directory?

A

chown

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
111
Q

If you want bob22 to manage a file or directory, but sally1 created the object, which command would allow you allow bob22 to manage permissions for the object?

A

chown ex: chown bob22 file1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
112
Q

You want to change the owner of file1 to jimmy5 and the group to engineers. what command and what would your syntax look like.

A

chown jimmy5:engineers file1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
113
Q

Which command allows you to schedule a command to execute by setting a command-line parameter?

A

at

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
114
Q

the cron daemon is control by what command?

A

crontab

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
115
Q

crontab files for system are located in what directory?

A

/etc/cron.d/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
116
Q

crontab files for users are located in what directory?

A

/var/spool/cron/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
117
Q

A distributed version control system primarily used by developers who are collaborating on projects.

A

git

118
Q

the managing and provisioning of infrastructure through code instead of through manual processes

A

IaC Infrastructure as Code

119
Q

Ansible, Puppet, Chef, Kubernetes, and OpenStack are all examples of what kind of tools?

A

Orchestration Tools

120
Q

Ansible uses what kind of configuration files, text does NOT contain curly brackets but has (-)s to help identify it.

A

YAML YAML is a data serialization language that is often used for writing configuration files

121
Q

What remote desktop software is a free and open source utility that constructs a Remote Desktop Protocol (RDP)-like server for the non-Windows system?

A

xrdp

122
Q

location includes configuration files for many components, including components that interface with devices.

A

/etc/

123
Q

location contains device driver files that enable the system and users to access devices themselves

A

/dev/

124
Q

location contains various files that represent system information reported by the kernel.

A

/proc/ In particular, the /proc/devices file contains a list of all device drivers that the kernel is currently running, separated by character and block storage devices.

125
Q

location is a virtual file system similar to /proc/ but that focuses more on creating a hierarchical view of device information.

A

/sys/ In particular, the /sys/devices/ subdirectory includes files that expose details about specific devices.

126
Q

is a computer bus interface standard for attaching storage devices to traditional computers

A

Serial AT Attachment (SATA)

127
Q

What are the differences between ss and netstat

A

ss (socket statistics) is a newer, faster, more human readable tool than the deprecated netstat.
ss and its options can display information about how your Linux machine is communicating with other machines, networks, and services; details about network connections, networking protocol statistics, and Linux socket connections.

128
Q

command displays various information about a system’s hardware as reported by the kernel.

A

lsdev

129
Q

command is used to display information about devices that are connected to the system’s PCI buses

A

lspci

130
Q

command is used to display information about devices that are connected to the system’s USB buses. This command scans the /dev/bus/usb/ directory for information.

A

lsusb

131
Q

command shows the status of the printer queue. By default, it will report each print job’s rank in the queue, who owns the job, the job number, the files in the job, and the size of the job.

A

lpq

132
Q

command dumps the system’s Desktop Management Interface (DMI) table and presents it in a human-readable format. You can use this command to verify connected devices and whether or not they support certain features

A

dmidecode

133
Q

command parses the /proc/meminfo file for easier analysis of memory usage statistics

A

free

134
Q

command displays various statistics amount virtual memory, as well as process, CPU, and I/O statistics

A

vmstat

135
Q

command lists each detected hardware component on the system and provides details about each device. The command pulls information from many different files in multiple device file locations like /proc/ and outputs in a hierarchical format.

A

lshw

136
Q

device acts as a control point for communications between network segments. Administrators can configure the device to permit or deny certain kinds of traffic, as well as pass traffic from one network segment to another.

A

router

137
Q

Network media or cables like __________ are commonly available as _____________ (STP) or _____________ (UTP). It is inexpensive and relatively easy to work with

A

ethernet, shielded twisted pair, unshielded twisted pair

138
Q

is a human-readable name given to a node that helps people better understand what device they are working with

A

hostname

139
Q

device acts as a concentrator, centralizing all network connections for a segment to a single device. These devices can be used to manage traffic for performance and security concerns.

A

switches

140
Q

tool is the most fundamental of the NetworkManager interfaces. It contains many subcommands that enable you to view and configure network information.

A

nmcli network manager command line interface

141
Q

command can be used to test connectivity and send data across network connections. Systems may be identified by IP address or by hostname.

A

The command may be spelled out as “netcat” or abbreviated as “nc” depending on the distribution

142
Q

is used to view the routing table. The command is also used to manipulate the routing table, enabling the administrator to configure desired routes.

A

route

143
Q

is used to store information that is easy for most programming languages to interpret and use. Because it uses a standard JavaScript format, it is also relatively easy for humans to interpret and write.

A

JSON JavaScript Object Notation

144
Q

may be used to store configuration information that is used on newly deployed virtual machines. This information may be used by cloud-init to install software or create user accounts during the virtual machine’s first boot, or may be used by orchestration tools like Ansible.

A

YAML Ain’t Markup Language (YAML)

145
Q

which 2 commands to discover dependencies before attempting an installation on Red Hat-derivative distributions.

A

the rpm -qR {package name} and yum deplist {package name}

146
Q

command to verify that all components of a package are installed. This is particularly useful if you believe configuration files or other needed files have been deleted.

A

rpm -V {package name}

147
Q

command to discover dependencies before attempting installation on Debian-derivative distributions.

A

apt-cache depends {package name}

148
Q

what command can be used to check for shared library file dependencies for software you will be compiling

A

ldd [options] {program binary}

149
Q

translate source code written in a human-friendly programming language, such as C or C++, into machine-readable binaries.

A

Compilers

150
Q

A _________ is a file that contains instructions used by a compiler to build a program from source code. These instructions typically define the resources that the program depends on in order to function properly, as well as any additional directives as defined by the developer.

A

makefile

151
Q

_________ are storage locations for available software packages. they can be checked by package managers like YUM and APT when installing or upgrading software.

A

Repositories or repos

152
Q

The rpm command is used to manage RPM packages on Red Hat-derived distributions. What are the two primary options available for Red Hat Package Manager (RPM) to keep software current?

A

-U upgrades and installs if not already installed -F freshens the installed package but does NOT install the package if not already installed

153
Q

is a package manager that supports repositories, dependency solving, and management of the software lifecycle. It is an openSUSE package manager that supports .rpm packages.

A

Zypper

154
Q

the ____________ package manager is an improved version of YUM. It uses fewer resources while still maintaining support for the fundamental RPM package manager.

A

Dandified YUM (DNF)

155
Q

What are the three kinds of repositories?

A

Local Centralized internal Vendor

156
Q

This apt subcommand for managing packages, is used to uninstall the package and remove its configuration files.

A

purge

157
Q

This apt subcommand for managing packages is used to uninstall the package, leaving behind its configuration files.

A

remove {package name}

158
Q

This apt subcommand for managing packages, is used to upgrade the package, or upgrade all packages if none provided (time-consuming).

A

upgrade {package name}

159
Q

_________ is a Linux kernel framework that handles packets that traverse a network interface. Some of the major services it provides are packet filtering, NAT, and connection tracking.

A

Netfilter

160
Q

In most Linux distributions, system logs are located in the ___________. Inside this directory are the logs themselves, and each file corresponds to a service, application, or feature

A

/var/log/ directory

161
Q

A _____________ is a message digest that has been encrypted with a user’s private key. Asymmetric encryption algorithms can be used with hashing algorithms to create digital signatures.

A

digital signature

162
Q

___________ are the most fundamental component of a PKI, and the overarching task of a PKI is to manage digital certificates in a variety of ways.

A

Digital certificates

163
Q

A ____________ is a server that issues digital certificates for entities and maintains the associated private/public key pair. CAs sign digital certificates so that clients can validate the authenticity of certificates owned by entities.

A

CA certificate authority

164
Q

A _________________ is a message sent to a CA in which an entity applies for a certificate. It typically includes information that should go into the entity’s certificate, like its public key, digital signature, and other identifying information.

A

CSR Certificate Signing Request

165
Q

is the default context-based permissions scheme provided with CentOS and Red Hat Enterprise Linux (RHEL), and is optionally available on other distributions.

A

Security-Enhanced Linux (SELinux)

166
Q

is a model in which access is controlled by comparing an object’s security designation and a subject’s (users or other entities) security clearance.

A

Mandatory access control (MAC)

167
Q

describe multiple types of information about processes and files that are used in combination to make decisions related to access control. In other words, the permission scheme defines various properties for a file or process, and uses those properties together, rather than in isolation, to determine whether to grant or deny access.

A

Context-based permissions

168
Q

is packaged with Debian-based and SUSE Linux distributions, whereas SELinux is more commonly associated with RHEL.

A

AppArmor

169
Q

___________ is a procedure in which data is encoded to reduce the amount of bits that are used to represent that data. The process can significantly reduce the size of a file or collection of files to make the storage and transfer of data more efficient.

A

compression

170
Q

____________ is an authentication service that is based on a time-sensitive ticket-granting system. It is used as a single sign-on (SSO) method where the user enters access credentials that are then passed to the authentication server, which contains an access list and allowed access credentials.

A

Kerberos

171
Q

________ is a directory service protocol that runs over Transmission Control Protocol/Internet Protocol (TCP/IP) networks.

A

LDAP

172
Q

A ________ is any unique object, whether physical or digital, that you possess and that can be used to verify your identity.

A

token

173
Q

A __________ is a technique of controlling what a process—a user, for example—can access on a file system by changing the root directory of that process’s environment.

A

chroot jail

174
Q

____________ occurs when a user is able to obtain access to additional resources or functionality that they are normally not allowed access to. One of the most common scenarios is when a normal user is able to exploit some vulnerability on a system to gain root-level privileges.

A

Privilege escalation

175
Q

The ________ command can effectively change a shell variable into an environment variable

A

export

176
Q

The _______ command will effectively change a shell variable into an environment variable. It can also be used to change the value of existing environment variables. When adding multiple directories, the _____ character is used to separate each directory you wish to add.

A

export , colon (:)

177
Q

The /usr/local/bin/dailyscript.sh command execution is using an ______________ to the dailyscript.sh script

A

absolute path

178
Q

The _________ command is used to download the branch of code from the remote repository. This is performed after the local repository is completely setup

A

git pull

179
Q

The _________ command initializes Git for the specific path that will hold all the project’s code. It is the first step in creating the local repository.

A

git init

180
Q

The ________ command is performed prior to creating the local repository. It configures a Git account

A

git config

181
Q

The ___________ command is the last step when creating the local repository. This will verify that there is nothing to commit.

A

get status

182
Q

The _____ command will list the current user’s pending jobs. Each job will display information in the following order: [job number] [date] [hour] [year] [queue] [username]. As a superuser, this command will list all automated tasks for all users.

A

atq

183
Q

_______ is the name of an orchestration tool that uses an agentless architecture to deploy and configure endpoints automatically. It can communicate over Secure Shell (SSH) and Windows Remote Management (WinRM).

A

Ansible

184
Q

_________ Orchestration does not require extra components at endpoints. It does this by connecting to systems or devices over existing transport mechanisms. SSH is an example of a transport mechanism that can be used to connect to Linux machines. this approach reduces the amount of setup required for agent-based models.

A

Agentless

185
Q

________ Orchestration requires a software component to reside on the managed device. This may impose additional demands on the organization’s environment and require extra setup. For example, this model may require firewall configuration in constrained environments.

A

Agent-based

186
Q

__________ is the name of an orchestration tool that operates in a client-server architecture. This requires an agent called a ______ client, to run on each managed node. The ______ client downloads and evaluates configuration code, known as recipes from a _____ server. (all the same name)

A

Chef

187
Q

Which orchestration tool uses YAML files to create repeatable “playbooks” that define the desired configuration state?

A

Ansible

188
Q

_______ was originally a joint Rackspace and NASA project, usually deployed as an IaaS solution to manage cloud resources. It is an open source software commonly used to create private and public clouds. It can orchestrate the deployment of a Linux, Apache, MySQL, PHP (LAMP) service, for example.

A

OpenStack

189
Q

__________ is an open source solution that provides container deployment and application orchestration for cloud and on-premises container environments. You define a desired state and this solution configures containers to match that state.

A

Kubernetes

190
Q

_______ uses _______ files to create repeatable “playbooks” that define the desired configuration state. this is an agentless solution that delivers files over SSH connections. Red Hat emphasizes the use of this solution.

A

Ansible, YAML

191
Q

The ______ command is used to manage Git repositories. Using this command and subcommands you can create a repository, add files to the repository, commit changes to the repository, pull down files from another repository, and much more. The _________ subcommand is used to create a working copy of an existing repository.

A

git, clone

192
Q

The _______ subcommand is used with the git command and integrates changes from one branch into a “master” branch.

A

merge

193
Q

The _______ subcommand used with the git command updates the Git repository with changes and creates a “snapshot” of that repository. These “snapshots” can be useful to compare previous versions of the repository with the “master.”

A

commit

194
Q

The ______ subcommand used with the git command sets options for a repository or for Git users, as well as other global options.

A

config

195
Q

_____________ is a name for orchestration tools that manage the entire deployment and configuration process through scripting and code files, rather than through traditional software tools. It relies on a single configuration specification to deploy the supporting infrastructure (the operating system) and the necessary applications.

A

Infrastructure as code

196
Q

print real and effective user and group IDs

A

id

197
Q

two types of network based booting

A

PXE and NFS

198
Q

print or control the kernel ring buffer

A

dmesg

199
Q

send ICMP ECHO_REQUEST to network hosts

A

ping

200
Q

print effective userid

A

whoami

201
Q

modify a user account

A

usermod

202
Q

modify a group definition on the system

A

groupmod

203
Q

create a new user or update default new user information

A

useradd

204
Q

create a new group

A

groupadd

205
Q

change user password expiry information

A

chage

206
Q

show a listing of last logged in users

A

last

207
Q

a fast, versatile, remote (and local) file-copying tool

A

rsync

208
Q

changes group ownership of a file or directory. Useful for applying permissions to a group.

A

chgrp

209
Q

a special permission bit that provides protection for files in a directory. Only owner or root can delete the object. Ensures other users cant delete but can still w/x. set with chmod, indicated by a t

A

sticky bit

210
Q

an attribute of a file or directory that prevents it from being modified, even by the root user. indicated by an “i”

A

Immutable Flag

211
Q

This command is used to list attributes of files/directories.

A

lsattr

212
Q

lsattr -R

A

Recursively list attributes of directories and their contents.

213
Q

lsattr -a

A

list all files and their attributes in directories

214
Q

lsattr -d

A

list directories like files, instead of their contents when looking at attributes

215
Q

lsattr -v

A

used to list attributes of files/directories -v = list version number of files

216
Q

Command that is used to change file/directory attributes. Options -R, -v, +i, -i

A

chattr -R = recursively change attributes of directories and their contents, -v = set version number of file, +i = mark file as immutable, -i = remove immutable attribute

217
Q

A list of permissions attached to an object

A

Access Control Lists

218
Q

Command that is used to retrieve ACLs of files and directories, output shows metadata about file and permissions info.

A

getfacl

219
Q

Command used to change permission associate with file/directory ACLs

A

setfacl

220
Q

setfacl -R

A

Recursively set ACL options for directories and their contents

221
Q

setfacl -s

A

Set ACL of an object/replace existing ACL

222
Q

setfacl -m

A

modify existing ACL

223
Q

setfacl -x

A

remove entries from existing ACL

224
Q

setfacl -b

A

remove all ACL entries

225
Q

Troubleshooting Model

A
  1. Identify the problem
  2. Establish a theory of probably cause
  3. Test the theory to determine the cause
  4. Establish a plan of action to resolve the issue
  5. Implement a solution or escalate the issue
  6. Verify system functionality and implement preventative measures
  7. Document findings, actions, and outcomes
226
Q

Permissions Troubleshooting always verify permissions with what command first?

A

ls -al

227
Q

The mechanism by which a shell maintains settings and other behavioral details about the shell

A

Shell Environment

228
Q

Computer programs that automate the execution of tasks for a particular runtime/shell environment.

A

scripts

229
Q

entities whose values change from time to time

A

variables

230
Q

_____ variable values are not passed on to child processes, but ________ variable values are

A

shell, environment

231
Q

a variable that is passed onto child shell processes

A

Environment Variable

232
Q

What does the env command do when not given arguments?

A

prints environment variables

233
Q

Environment variables returned by the env command include among other things what four basic pieces of information?

A

HOSTNAME, SHELL, HISTSIZE, USER

234
Q

_______ is an environmental variable in Linux and other Unix-like operating systems that tells the shell in which directories to search for executable files in response to commands issued by a user.

A

PATH

235
Q

which command can be used to help diagnose latency issues with a disk?

A

ioping

236
Q

You have created a daemon process from the command line, you want to SUSPEND the process. Which key combination do you use?

A

Ctrl+Z will suspend the process …… Ctrl+C kills the process

237
Q

the __________ command formats a swat partition

A

mkswap . . . the fdisk command is used to create the partition but not to format it

238
Q

which command will show you all of the processes associated with a given argument ex: sshd

A

pidof

239
Q

in what directory are modules stored?

A

/usr/lib/modules/{kernel-version}

240
Q

You need to temporarily prevent users from logging in to the system, but maintain root user log in

A

touch /etc/nologin . . . if this file exists, then users will be prevented from logging in to the system, but root still can

241
Q

Within which directory are the predefined zones for firewalld?

A

/usr/lib/firewalld/zones/ . . . . . the files are copied to /etc/firewalld/zones when modified

242
Q

the command kill -HUP does what?

A

will restart a process

243
Q

Which command installs a previously downloaded Debian package?

A

dpkg -i

244
Q

Within which directory hierarchy will you find configuration files related to printing with the CUPS printing system on a print server?

A

/etc/cups

245
Q

Which option for yum performs a search of the package cache?

A

yum search

246
Q

Which command and option will unset an environment variable for the current session?

A

env -u

247
Q

Which command can be used to listen for netlink messages on a network?

A

ip monitor

248
Q

Which command is used to turn off AppArmor profiles?

A

aa-disable

249
Q

T or F: Commands within /etc/rc.local will be executed after the computer has gone into multiuser mode

A

true - by placing the commands in this file they will execute upon boot

250
Q

what will the command syntax echo s{i,a,e}t produce? (those are curly brackets)

A

sit sat set

251
Q

what does command and option rmmod -f

A

it forces the removal of the module

252
Q

which option with git merge can be used to attempt to roll back a merge that has conflicts?

A

–abort

253
Q

what is sudo -u used for?

A

to execute a command as a specific user

254
Q

Which command can be used to determine how much time a Linux command takes?

A

time

255
Q

in /etc/resolv.conf, what will the line nameserver 192.168.1.4 do?

A

will set the DNS server to the ip 192.168.1.4

256
Q

what is the maxlogins parameter within /etc/security/limits.conf used to control?

A

controls the number of simultaneous logins for a given account

257
Q

Which PAM module is responsible for enforcing limits such as the maximum number of logins and CPU time used?

A

pam_limits.so

258
Q

What are the functions of the command and options hwclock -w hwclock -s

A

the -w option sets the hardware clock to the current system time . . . . . the -s option sets the system time to the hardware clock (these are opposite functions)

259
Q

T or F: The .gitignore file is used to store files that will not be versioned.

A

True .gitignore file is used within a git repository to indicate files and file patterns that should not be versioned.

260
Q

Within the SELinux configuration, which option controls whether the policy will be targeted or strict?

A

SELINUXTYPE

261
Q

You need to disable the ability to reboot the Linux computer using the Ctrl+Alt+Del key combination. Within which file will you find the configuration for this key combination?

A

/etc/inittab

262
Q

Which word pair indicates the beginning and end of a “for loop” and an “until loop” in a bash script?

A

do; done

263
Q

What is the result of the following command hwclock –systohc –utc

A

command will set the hardware clock to UTC based on the current system time

264
Q

which option with ioping and ping sets the number of requests to send?

A

-c

265
Q

which option when used with arp, creates a new entry for a given IP address to MAC pair? What option removes an entry?

A

-s creates an ARP table entry . . . . -d option removes an entry

266
Q

What EXT tool can be used to change the label that has been applied to a filesystem?

A

e2label

267
Q

what command indicates the current mode of SELinux?

A

sestatus

268
Q

What command can be used to change the mode of SELinux to Enforcing?

A

setenforce Enforcing or setenforce 1

269
Q

You have backgrounded several tasks using &. Which command can be used to view the current list of running tasks that have been backgrounded?

A

jobs

270
Q

which partition type is used to indicate a software RAID array such as an array built with mdadm?

A

0xFD

271
Q

is a dialog-driven program for creation and manipulation of partition tables. It understands GPT, MBR, Sun, SGI and BSD partition tables

A

fdisk

272
Q

ss -t -a

A

show all tcp ports connected and listening

273
Q

which command is used to display information about the access control list for a given file?

A

getfacl

274
Q

When using a multipath device, found in /dev/disk/by-multipath, what is the name given to the identifier for that device that is globally unique?

A

WWID

275
Q

The directory that holds modules. Modules are specific to the kernel.

A

/usr/lib/modules/[kernel name]

276
Q

command that shows a list of modules that have been loaded. Lets you check to see if a needed module was loaded already.

A

lsmod

277
Q

command that lists details about a module. Version, kernel, description, etc.

A

modinfo

278
Q

command that generates a list of dependencies between modules

A

depmod

279
Q

which command manually loads a module into the kernel, but doesn’t search common directories and doesn’t look at dependencies?

A

insmod

280
Q

which command removes/unloads a module, but doesn’t look at dependencies.

A

rmmod [modulename]

281
Q

which command is best for managing modules?

A

modprobe

282
Q

which module management command uses the dependency lists and maps to manage loading and unloading of modules?

A

modprobe

283
Q

modprobe automatically looks for modules in what directory that matches the current kernel

A

/usr/lib/modules/[kernel]

284
Q

Runlevel 1

A
285
Q

when using the preferred module management command what is the syntax for adding a module?

A

modprobe

286
Q

when using the preferred module management tool, what is the syntax for removing a module?

A

modprobe -r

287
Q

Which command looks at device to kernel messages, and is the best command to look for errors when loading modules?

A

dmesg

288
Q

what is the process of preventing the loading of modules to limit functionality?

A

blacklisting

289
Q

if you list a module name in this modprobe file, it cannot be automatically loaded

A

/etc/modprobe.d/blacklist.conf

290
Q

what is the syntax for adding a .conf file using the module name bluetooth, and then to blacklist the module and prevent it from loading?

A

echo “blacklist bluetooth” >/etc/modprobe.d/bluetooth.conf

291
Q

you have stopped the automatic loading of the example bluetooth module by adding “blacklist bluetooth” to the /etc/modprobe.d/bluetooth.conf file. How would you stop the automatic and MANUAL loading of the module using this same file?

A

by inserting a line in the bluetooth.conf file that states: install bluetooth /bin/true