SECFND 9: Linux Flashcards

1
Q

chmod

A

Modify file perms

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

chmod symbolic mode

A

Use a symbol to represent the access class and the access type you want to modify

“chmod u+r MyFile.txt”

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

Symbolic mode access class letters

A

U, G, O, A (a is default)

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

Symbolic mode operator symbols

A

+, -, =

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

Symbolic mode access type letters

A

R, W, X

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

Symbol to reset access type when using chmod

A

= (resets rather than changes)

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

First partition on first HDD

A

/dev/sda1

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

parted command

A

partition tool

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

gparted

A

graphical partition tool

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

fdisk

A

partition tool (MBR)

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

gdisk

A

partition tool

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

GPT

A

newer partition table type. More partitions and disk size.

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

ext2, ext3, ext4

A

Linux file systems

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

ISO 9660 and Juliet

A

File systems for optical media

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

/etc/fstab

A

A list of all devices previously mounted. uses UUID identifier

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

mount command

A

Mount a device

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

Boot loaders (2)

A

GRUB, LILO

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

BOOT_IMAGE

A

Part of boot loader. References Kernel and followed by root=partition

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

System V

A

Init process. Runs scripts one at a time

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

Systemd

A

Newer init process. Runs scripts parralel

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

Run levels

A

7 run levels (0-6) that contain scripts to start and stop daemons. Part of the init process (mostly System V)

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

/etc/inittab

A

Part of System V init

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

/proc/cmdline

A

Boot parameters processed by boot loader

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

Single user mode

A

Safe mode (never to be used for forensics.

Run level 1

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

Run level 1

A

Safe mode

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

shutdown -h

A

Halt the system

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

X11

A

GUI subsystem

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

TID

A

Thread ID

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

How do multi-threaded processes start

A

Main thread, then additional as needed. They run in parralel

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

PID after process fork

A

Parent takes child’s PID. Child gets PID 0

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

top command

A

real-time view of system information including system up time, process information, and resource utilization

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

TOP NICE value

A

19 to -20. Higher number is lower priority. Lower number is higher priority.

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

TOP S column

A

Process status
R: Running
S: Sleeping
Z: Zombie

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

PS command

A

lists processes that are associated with the user running the command

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

PS -f

A

Full output

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

PS -e

A

See processes for everyone

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

PS -fC sshd

A

See full info on processes associated with SSHD service

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

grep

A

Filter with wild cards and regular expressions

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

.*

A

Regex that means any. Same as good old *

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

LSOF command

A

Lists processes using certain files. Must be elevated to use (SUDO)

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

sudo lsof +D /var/log

A

Lists processes using files in a directory

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

sudo lsof -p 892

A

Lists files access by a process

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

sudo lsof -i TCP -s TCP:LISTEN

A

List services listening for connections

44
Q

top -p 892

A

Monitor a certain PID

45
Q

pidof command

A

PID of… Find the PID of a service

46
Q

vmstat command

A

View memory utilization

47
Q

iostat command

A

Monitor I/O

48
Q

env command

A

Show environment variables

49
Q

STDIN

A

Input from keyboard or files

50
Q

STDOUT

A

Output to the display, files, or devices

51
Q

STDERR

A

Output from error messages which goes to display, files, or devices

52
Q

CAT command

A

Display contents of files

53
Q

> vs&raquo_space; command

A

> overwrites.&raquo_space; appends to existing file

54
Q

&& Command

A

Used to run multiple commands. Next command runs after last one finishes

55
Q

history command

A

Lists history of commands run

56
Q

!! Command

A

Repeat last command

57
Q

awk command

A

Data extraction and text processing

58
Q

awk ‘{print $1 “\t” $2 “\t” $8}’

A

Print column 1, tab, column 2, tab, column 8)

59
Q

sed command

A

Stream editing command similar to find and replace.

60
Q

sed ^

A

^ is beginning of a line

61
Q

sed $

A

$ is end of a line

62
Q

Linux text editors (2)

A

vi, nano

63
Q

netstat -rn

A

Routing table with numbered address

64
Q

ifconfig

A

View AND change IP info

65
Q

route add command

A

Add a default GW

66
Q

service command

A

use it to stop and start services (often found with ps command)

67
Q

/etc/init.d

A

Startup scripts in system systems

68
Q

systemctl command

A

Used to manage “units” such as services

69
Q

netstat -a46

A

Any connection state on IPv4 and IPv6

70
Q

netstat -n

A

Show IP and Port numbers instead of names

71
Q

sudo lsof –i

A

List files that are associated with an internet address.

72
Q

resolv.conf

A

Primary DNS config file. Contains search domain and name servers

73
Q

nsswitch.conf

A

Lists sources of different resources on the system, including name resolution order (hosts, multicast, DNS)

74
Q

whois command

A

Searches ARIN, RIPE, APNIC for IP address whois info

75
Q

tcpdump -s 0

A

Display the entire packet

76
Q

syslogd

A

Logging process

77
Q

rsyslogd

A

More recent version of syslogd. Added functionality through extensions.

78
Q

syslog selector syntax

A

facility.severity

Facility=process/service

mail. alert
cron. none
kern. emergency

79
Q

(r)syslog.conf location

A

/etc/syslog

80
Q

syslog port

A

UDP 514

81
Q

logger command

A

Sends test messages to log files

82
Q

.c extension

A

Often used for C language source code files

83
Q

gcc compiler

A

Open source compiler for Linux

84
Q

.o extension

A

Belong to object files

85
Q

.a extension

A

Archive file. Archive of multiple object files.

86
Q

.so extension

A

Shared object files

87
Q

.h extension

A

Header files

88
Q

gcc -o command

A

Compile a file with output file name

89
Q

autotools

A

Script and automate compiling on Linux.

90
Q

configure command

A

Makes sure everything needed for compiling is there. Customizes for the local system.

91
Q

make command

A

compiles the program

92
Q

make install command

A

Installs the program after compiling

93
Q

Process to compile a program

A

Decompress (if needed), run configure, run make, run make install

94
Q

tar command

A

Extracts from compressed files

95
Q

Executable

A

Binary files that run CPU code. Often .bin

96
Q

Interpreters

A

Application that can read commands from a source file and perform actions

97
Q

!/bin/sh

A

First line of a BASH shell script. aka Shebang

98
Q

.sh extension

A

Used for BASH scripts

99
Q

.pl extension

A

Perl script

100
Q

.py extension

A

Python script

101
Q

RPM

A

Installation package for Red Hat based systems

102
Q

.deb extension

A

Installation package for Debian-based systems

103
Q

What do package managers do?

A

resolve or identify package dependencies, update or upgrade software, uninstall software, and select the remote repositories for fetching software

104
Q

yum

A

Red Hat package management

105
Q

apt

A

Debian package management

106
Q

/var/log/slapd

A

Location of LDAP files