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
Q

last -x

A

Display the system shutdown entries and run level changes

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

What order do the bash and profile configuration files execute?

A

/etc/profile
~/.bash_profile
~/.bashrc
/etc/bashrc

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

Non-login shell will only execute…

A

/etc/bashrc

~/.bashrc

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

Ways to switch to root using login shell

A

su -
su –login
su -l

29
Q

exec

A

Replaces the current shell process with the specified command

30
Q

logrotate configuration file

A

/etc/logrotate.conf

31
Q

In logrotate.conf, compress

A

compress old version of files with gzip

32
Q

In logrotate.conf, rotate

A

files are rotated the specified amount of times before being removed or mailed

33
Q

In logrotate.conf, size

A

Log will be rotated once it reaches a certain size

34
Q

In logrotate.conf, prerotate

A

Lines between prerotate and endscript are executed before the log file is rotated

35
Q

In logrotate.conf, postrotate

A

Lines between postrotate and endscript are executed after the log file is rotated

36
Q

In logrotate.conf, sharedscripts

A

Makes prerotate and postrotate scripts run only once (prerotate before any of them start and postrotate after all have rotated)

37
Q

In logrotate.conf, create

A

Immediately after rotation the log file is created with the same name as the log file just rotated

38
Q

journalctl

A

Without parameters will show the full contents of the journal starting with the oldest entry

39
Q

journalctl -n

A

Show the specified number of lines

40
Q

journalctl -k

journal –dmesg

A

show only kernel messages

41
Q

By default the journal data is stored in _______

A

/run/log/journal

This is temporary storage, cleared at reboot

42
Q

journalctl _SYSTEMD_UNIT=httpd.service

A

Show entries pertaining to httpd.service

43
Q

dig @8.8.8.8 domainname.com

A

Use 8.8.8.8 as the nameserver for the lookup

44
Q

host -4

host -6

A

Force IPv4 or IPv6

45
Q

host google.com 8.8.8.8

A

Use 8.8.8.8 as the name server for the host command

46
Q

System provided configuration files for lightdm

A

/usr/share/lightdm/lightdm.conf.d/*.conf

47
Q

Configuration files you can edit to override lightdm settings

A

/etc/lightdm/lightdm.conf.d/*.conf
or
/etc/lightdm/lightdm.conf

48
Q

How to disable booting into a graphical user interface

A

Edit /etc/default/grub and set

GRUB_CMDLINE_LINUX=”text”

49
Q

GRUB default configuration file

A

/etc/default/grub

50
Q

How to disable guest login

A

allow-guest=false

51
Q

How to hide the user list

A

greeter-hide-users=true

52
Q

How to allow manual login

A

greeter-show-manual-login=true

53
Q

How to set automatic login

A

autologin-user=username

autologin-user-timeout=delay

54
Q

nc

A

Used to test a network service that’s behaving oddly

55
Q

nc -z

A

specifies that nc should just scan for listening daemons without sending any data to them

56
Q

nc -l

A

binds to a specific port to listen for incoming connections

57
Q

nc -vz localhost 22

A

runs netcat on localhost port 22

58
Q

traceroute -n

A

Do not map IP address to host names when displaying them

59
Q

traceroute -p

A

Specify port number

60
Q

tracepath

A

show the route to a destination and discovers MTU

61
Q

/etc/hostname

A

File where the hostname is stored

62
Q

In /etc/resolv.conf, domain server.com

A

Use server.com for short searches

63
Q

In /etc/resolv.conf, search server.com

A

Will make it so that test.server.com will work just by accessing “test”

64
Q

netstat -P

A

show the PID and name of the program to which each socket belongs

65
Q

netstat -i

A

Display interface information

66
Q

netstat -r

A

Display routing table information

67
Q

netstat -M

A

Information about IP/NAT Linux masquerade

68
Q

netstat -a

A

Display all info

69
Q

netstat -n

A

Do not resolve to hostnames