2015 Updates Flashcards Preview

Linux+ (LXO-104) > 2015 Updates > Flashcards

Flashcards in 2015 Updates Deck (69):
1

getent

-Displays entries from databases configured in /etc/nsswitch.conf
-Most commonly used to query passwd, hosts, group, and services

2

anacron

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

3

anacron -f

Forces execution of all jobs

4

anacron -u

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

5

anacron -n

Run all jobs immediately

6

anacron -t

Use the specified file rather than /etc/anacrontab

7

Can regular users use anacron?

no!

8

anacron syntax

period_in_days delay_in_minutes
job_identifier
command

9

who -b

time of last system boot

10

who -l

print system login processes

11

who -q

count all login names and number of users logged in

12

who -u

list logged in users and process id/comment

13

who -H

print column headers

14

who -a

print all info

15

fuser

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

16

fuser -k

Kills all processes accessing a file

17

fuser -i

interactive mode

18

fuser -v

verbose

19

fuser -u

append username

20

fuser -a

display all filenames

21

w -i

display ip addresses instead of hostnames

22

last -n

show specific number of lines

23

last -R

suppress hostname

24

last -F

Print full login and logout times and dates

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