2015 Updates Flashcards

1
Q

getent

A
  • Displays entries from databases configured in /etc/nsswitch.conf
  • Most commonly used to query passwd, hosts, group, and services
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

anacron

A

Like cron, but looks to see if it has been AT LEAST a certain time since the last time the job was run.

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

anacron -f

A

Forces execution of all jobs

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

anacron -u

A

Updates the timestamps of all jobs to current time but does not actually run any

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

anacron -n

A

Run all jobs immediately

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

anacron -t

A

Use the specified file rather than /etc/anacrontab

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

Can regular users use anacron?

A

no!

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

anacron syntax

A

period_in_days delay_in_minutes
job_identifier
command

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

who -b

A

time of last system boot

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

who -l

A

print system login processes

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

who -q

A

count all login names and number of users logged in

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

who -u

A

list logged in users and process id/comment

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

who -H

A

print column headers

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

who -a

A

print all info

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

fuser

A

Display the PIDs of processes using the specified files or file systems

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

fuser -k

A

Kills all processes accessing a file

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

fuser -i

A

interactive mode

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

fuser -v

A

verbose

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

fuser -u

A

append username

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

fuser -a

A

display all filenames

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

w -i

A

display ip addresses instead of hostnames

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

last -n

A

show specific number of lines

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

last -R

A

suppress hostname

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

last -F

A

Print full login and logout times and dates

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
last -x
Display the system shutdown entries and run level changes
26
What order do the bash and profile configuration files execute?
/etc/profile ~/.bash_profile ~/.bashrc /etc/bashrc
27
Non-login shell will only execute...
/etc/bashrc | ~/.bashrc
28
Ways to switch to root using login shell
su - su --login su -l
29
exec
Replaces the current shell process with the specified command
30
logrotate configuration file
/etc/logrotate.conf
31
In logrotate.conf, compress
compress old version of files with gzip
32
In logrotate.conf, rotate
files are rotated the specified amount of times before being removed or mailed
33
In logrotate.conf, size
Log will be rotated once it reaches a certain size
34
In logrotate.conf, prerotate
Lines between prerotate and endscript are executed before the log file is rotated
35
In logrotate.conf, postrotate
Lines between postrotate and endscript are executed after the log file is rotated
36
In logrotate.conf, sharedscripts
Makes prerotate and postrotate scripts run only once (prerotate before any of them start and postrotate after all have rotated)
37
In logrotate.conf, create
Immediately after rotation the log file is created with the same name as the log file just rotated
38
journalctl
Without parameters will show the full contents of the journal starting with the oldest entry
39
journalctl -n
Show the specified number of lines
40
journalctl -k journal --dmesg
show only kernel messages
41
By default the journal data is stored in _______
/run/log/journal This is temporary storage, cleared at reboot
42
journalctl _SYSTEMD_UNIT=httpd.service
Show entries pertaining to httpd.service
43
dig @8.8.8.8 domainname.com
Use 8.8.8.8 as the nameserver for the lookup
44
host -4 host -6
Force IPv4 or IPv6
45
host google.com 8.8.8.8
Use 8.8.8.8 as the name server for the host command
46
System provided configuration files for lightdm
/usr/share/lightdm/lightdm.conf.d/*.conf
47
Configuration files you can edit to override lightdm settings
/etc/lightdm/lightdm.conf.d/*.conf or /etc/lightdm/lightdm.conf
48
How to disable booting into a graphical user interface
Edit /etc/default/grub and set | GRUB_CMDLINE_LINUX="text"
49
GRUB default configuration file
/etc/default/grub
50
How to disable guest login
allow-guest=false
51
How to hide the user list
greeter-hide-users=true
52
How to allow manual login
greeter-show-manual-login=true
53
How to set automatic login
autologin-user=username | autologin-user-timeout=delay
54
nc
Used to test a network service that's behaving oddly
55
nc -z
specifies that nc should just scan for listening daemons without sending any data to them
56
nc -l
binds to a specific port to listen for incoming connections
57
nc -vz localhost 22
runs netcat on localhost port 22
58
traceroute -n
Do not map IP address to host names when displaying them
59
traceroute -p
Specify port number
60
tracepath
show the route to a destination and discovers MTU
61
/etc/hostname
File where the hostname is stored
62
In /etc/resolv.conf, domain server.com
Use server.com for short searches
63
In /etc/resolv.conf, search server.com
Will make it so that test.server.com will work just by accessing "test"
64
netstat -P
show the PID and name of the program to which each socket belongs
65
netstat -i
Display interface information
66
netstat -r
Display routing table information
67
netstat -M
Information about IP/NAT Linux masquerade
68
netstat -a
Display all info
69
netstat -n
Do not resolve to hostnames