Unix OS Flashcards

1
Q

Components of Linux

A

Kernel
libraries
utilities
UI/CLI

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

Linux boot sequence

A

BIOS -> GRUB -> Kernel -> init -> runlevel

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

MBP

A

Master Boot Record is normally located in /dev/hda or /dev/sda

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

GRUB

A

Grand unified boot loader
if you want multiple installed on your system you can choose which to execute.

Location /boot/grub/grub.conf which link to /etc/grub.conf

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

what does kernel do in the boot sequence

A

mounts root files system in grub.conf

executes /sbin/init

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

what does initrd stand for.

A

initial Ram Disk

is used by kernel as temporary root file system until kernel is booted and real root file system is mounted.

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

What is init and its levels.

A

initialization of the OS. /etc/inittab file decides whip run level.

0 halt
1 single user mode
2 multimuser, without NFS
3 full multiuser mode with command line
4 unused 
5 full multiuser mode with GUI/X11
6 reboot

most machines boot in 3 or 5

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

What is run level

A

Depending on the level the init system would execute a program from one of the directories supporting that level.
/etc/rf.d/rc[level#].d/

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

Program that start with a S mean what in the run level directory

A

start up

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

Program that start with a K mean what in the run level

directory

A

shutdown

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

What are the linux directories

A
bin
boot
dev
etc
home
lib
lost+found
media
mnt
opt
proc
root
sbin
src
srv
tmp
usr
var
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How many directories are then in linux

A

18

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

What is directory bin?

A

contains the system binary files that are essential for general operation of your computer. ex cp ls

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

What is directory boot?

A

contains only the files that are absolutely necessary to get ta basic linux system up and going. this only contains grub in formation

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

What is directory dev?

A

where are devices are located.

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

What is directory etc?

A

this is the config folder for your entire OS. Almost everything about he configuration is stored here.

These files are static and text based

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

What is directory home?

A

is where you store your user specific documentation and setting.

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

What is directory lib?

A

contains system library binaries that re required to run the system.

uses .so for these similar to windows dll.

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

What is directory media?

A

used to store removable media only.

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

What is directory mnt?

A

this is where you want to mount drives. temporary

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

What is directory opt?

A

is reserved for additional software you install. most people don’t use this director.

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

What is directory sbin?

A

these are binaries that are reserved for root users. they typically will only work when executed by root or sudo.

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

What is directory src?

A

used for plug and play configuration

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

What is directory tmp?

A

is a temporary storage folder.

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

What is directory usr?

A

houses all the binaries documentation libraries and header files for all the user applications. most usr binaries would be installed in to his folder.

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

What is directory var?

A

this stores all the files that vary as a the system runs. like log files backups mail cache

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

What is directory root ?

A

is the home directory for the root user.

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

What is directory proc?

A

is a virtual directory that contains process information. it contains runtime system info like system memory device mounted , hardware configuration

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

What is directory lost+found?

A

if your file system crash and the linux file system checker fsck recovers corrupt files they are placed here

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

What is directory srv?

A

it holds site specific data to be served by the system for protocols.

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

What is the most common file system used

A

*ext family

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

What is a inode

A

is a data structure that all the information about a file expect its name and data

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

what is a symbolic link

A

a point to another file

ln -s source.file softlink

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

what is a hard link

A

a copy of a file

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

wheel group

A

has special system privileges such as su -.

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

What does “|” mean in linux command line?

A

used to take output from one command to another

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

What does “;” mean in linux command line?

A

used for sequential commands the previous commands has to complete

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

What does “&” mean in linux command line?

A

used to run a command in the background

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

What does “()” mean in linux command line?

A

could be sued to expand a command before the outside commands runs

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

What does the reverse of this do: “>” mean in linux command line?

A

directs contents of a file to a command

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

What does “>” mean in linux command line?

A

directs the stand output to a command or file

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

What does “2>” mean in linux command line?

A

directs standard error to a file

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

What does “&>” mean in linux command line?

A

directs standard out and stand error to a file

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

What does “»” mean in linux command line?

A

direct both output of command to a file adding it to the end

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

What does “{}” mean in linux command line?

A

Expands out a set of characters.

ex Touch memo{1,2,3} would create memo1 memo2 memo3

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

What does “*” mean in linux command line?

A

matches any character

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

What does “?” mean in linux command line?

A

matches only one character

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

What does “[…]” mean in linux command line?

A

matches anything within the bracket.

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

What is bash?

A

borne again shell

50
Q

/etc/profile

A

sets up user environment information for every user.

51
Q

/etc/bashrc

A

executes for every user who run the bash shell each time it opens

52
Q

~./.bash_profile

A

is used by the user for there own profile its only ran once and works for future shells.

53
Q

~./.bashrc

A

contains information specific to your bash sell

54
Q

~./.bash_logout

A

executes each time you close a shell

55
Q

How is is file permission broken out in unix?

A

Number and Letters

56
Q

Functions of file permission ?

What are there numbers and letters

A
Read 4 (r)
Write 2 (w) 
Execute 1 (x)
57
Q

How is permission broke into

A

directoryOrNot|Owner|group|everyone

58
Q

Lettes for permission

A

Users(u)
Group(g)
Other(o)
All(a)

59
Q

what does + - do for permission

A

add and remove

60
Q

$ chmod u+x filename

A

give user execution permission

61
Q

chmod u+r,g+x filename

A

give the user read permission and group execute permission

62
Q

chmod u-rx filename

A

remove user read and execute permission

63
Q

chmod a+x filename

A

give all execute permission

64
Q

chmod –reference=file1 file2

A

copy the permission from one file to the other

65
Q

chmod -R 755 directory-name/

A

change the directory and everything underneath to full permission

66
Q

chmod u+X *

A

give everything in the folder execute permission

67
Q

chown

A

change the owner of a file/folder. group:user

68
Q

what are the signals available in linux

A
SIGHUP
SIGINT
SIGKILL
SIGTERM
SIGSTOP
69
Q

What is SIGUP and its value?

A

Hangup value is 1

70
Q

What is SIGINT and its value?

A

interrupt from keyboard value is 2

71
Q

What is SIGKILL and its value?

A

kill signal value 9

72
Q

What is SIGTERM and its value?

A

termination signal value is 15

73
Q

What is SIGSTOP and its value?

A

stop the process value is 17,19,23

74
Q

What is syslog? Where are they stored?

A

is use to store log files from the system. and where is it stored

/var/log/syslog
/var.log

75
Q

What are the log levels

A
0-7
emergencies
alert
critical
error 
warning
notification
informational 
debugging
76
Q

where is passwords stored in linux

A

/etc/shadow file

77
Q

what does $ mean on the command line

A

regular user

78
Q

what does # mean

A

root users

79
Q

what does “whoami” command do?

A

shoes username

80
Q

what does “grep” command do?

A

search for input within a file

81
Q

what does “pwd” command do?

A

print working directory

82
Q

what does “ls” command do?

A

list the directory

83
Q

what does “ls -la” command do?

A

shows all the file and folders

84
Q

what does “mkdir” command do?

A

makes a directory

85
Q

what does “tar “ command do?

A

used to compress or decompress files

86
Q

what does “.” before file name command do?

A

hides a file

87
Q

what does “uname -a “ command do?

A

prints system information

88
Q

what does “who” command do?

A

shows who is logged into the ystem

89
Q

what does “type [command]” command do?

A

is use to find where is a command taken from

90
Q

what does “locate” command do?

A

is used to find a command on the directory that is not on your path.

91
Q

what does “history” command do?

A

is used to show commands type

92
Q

what does “alias” command do?

A

is used to create shortcuts.

93
Q

what does “source” command do?

A

used to add a file to the current shell

94
Q

what does “touch” command do?

A

is used to change the timestamp of a file. if no file exist it will create the file

95
Q

what does “fg” command do?

A

bring a task to the foreground

96
Q

what does “bg” command do?

A

bring any task to the background

97
Q

what does “ruser” command do?

A

like who but for the list of host or all machines on a network.

98
Q

what does “finger” command do?

A

used to find user information.

99
Q

what does “losf” command do?

A

list of open files

100
Q

what does “df “ command do?

A

reports the file system disk space usage

101
Q

what does “du” command do?

A

report estimates of file space usage

102
Q

what does “top” command do?

A

shows the processing running.

103
Q

what does “adduser” command do?

A

used to create a user account

104
Q

what does “passwd -l username” command do?

A

disable account

105
Q

what does “passwd -r” command do?

A

delete an account

106
Q

what does “groupmod” command do?

A

change the groups definitions

107
Q

what does “usermod -a G groupName userName” command do?

A

added a user to a group .

108
Q

what does “deluser user GROUPNAME” command do?

A

delete a user from a group

109
Q

Systemctl [options] COMMAND [NAME]

A

used to manage a command

110
Q

Service NAME [COMMAND]

A

used to manage commands.

111
Q

security hash

A

Username:$#$HASH:last password changed:min number days between passord changes:maximun number of days valid:warn:inactive:expire

	a. '#" Algorithems used
		i. 1 -md5hash
		ii. 2a - blowfish
		iii. 2y - blowfish
		iv. 5 - sha256 6 - sha512
112
Q

TTL for linux is

A

64

113
Q

What does updatedb do?

A

it updates the database for file names.

it is updated once a day.

114
Q

What does ‘id’ command do

A

shows username

115
Q

what does w command do

A

logged on users

116
Q

what does who -a

A

user information

117
Q

what /etc/shadow

A

shows local user hashes

118
Q

/etc/passwd

A

shows local users

119
Q

/etc/group

A

local groups

120
Q

/etc/rc.d

A

startup services

121
Q

etc/init.d

A

Service

122
Q

/etc/hosts

A

known hostnames and IP