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
What is directory usr?
houses all the binaries documentation libraries and header files for all the user applications. most usr binaries would be installed in to his folder.
26
What is directory var?
this stores all the files that vary as a the system runs. like log files backups mail cache
27
What is directory root ?
is the home directory for the root user.
28
What is directory proc?
is a virtual directory that contains process information. it contains runtime system info like system memory device mounted , hardware configuration
29
What is directory lost+found?
if your file system crash and the linux file system checker fsck recovers corrupt files they are placed here
30
What is directory srv?
it holds site specific data to be served by the system for protocols.
31
What is the most common file system used
*ext family
32
What is a inode
is a data structure that all the information about a file expect its name and data
33
what is a symbolic link
a point to another file ln -s source.file softlink
34
what is a hard link
a copy of a file
35
wheel group
has special system privileges such as su -.
36
What does "|" mean in linux command line?
used to take output from one command to another
37
What does ";" mean in linux command line?
used for sequential commands the previous commands has to complete
38
What does "&" mean in linux command line?
used to run a command in the background
39
What does "()" mean in linux command line?
could be sued to expand a command before the outside commands runs
40
What does the reverse of this do: ">" mean in linux command line?
directs contents of a file to a command
41
What does ">" mean in linux command line?
directs the stand output to a command or file
42
What does "2>" mean in linux command line?
directs standard error to a file
43
What does "&>" mean in linux command line?
directs standard out and stand error to a file
44
What does ">>" mean in linux command line?
direct both output of command to a file adding it to the end
45
What does "{}" mean in linux command line?
Expands out a set of characters. | ex Touch memo{1,2,3} would create memo1 memo2 memo3
46
What does "*" mean in linux command line?
matches any character
47
What does "?" mean in linux command line?
matches only one character
48
What does "[...]" mean in linux command line?
matches anything within the bracket.
49
What is bash?
borne again shell
50
/etc/profile
sets up user environment information for every user.
51
/etc/bashrc
executes for every user who run the bash shell each time it opens
52
~./.bash_profile
is used by the user for there own profile its only ran once and works for future shells.
53
~./.bashrc
contains information specific to your bash sell
54
~./.bash_logout
executes each time you close a shell
55
How is is file permission broken out in unix?
Number and Letters
56
Functions of file permission ? | What are there numbers and letters
``` Read 4 (r) Write 2 (w) Execute 1 (x) ```
57
How is permission broke into
directoryOrNot|Owner|group|everyone
58
Lettes for permission
Users(u) Group(g) Other(o) All(a)
59
what does + - do for permission
add and remove
60
$ chmod u+x filename
give user execution permission
61
chmod u+r,g+x filename
give the user read permission and group execute permission
62
chmod u-rx filename
remove user read and execute permission
63
chmod a+x filename
give all execute permission
64
chmod --reference=file1 file2
copy the permission from one file to the other
65
chmod -R 755 directory-name/
change the directory and everything underneath to full permission
66
chmod u+X *
give everything in the folder execute permission
67
chown
change the owner of a file/folder. group:user
68
what are the signals available in linux
``` SIGHUP SIGINT SIGKILL SIGTERM SIGSTOP ```
69
What is SIGUP and its value?
Hangup value is 1
70
What is SIGINT and its value?
interrupt from keyboard value is 2
71
What is SIGKILL and its value?
kill signal value 9
72
What is SIGTERM and its value?
termination signal value is 15
73
What is SIGSTOP and its value?
stop the process value is 17,19,23
74
What is syslog? Where are they stored?
is use to store log files from the system. and where is it stored /var/log/syslog /var.log
75
What are the log levels
``` 0-7 emergencies alert critical error warning notification informational debugging ```
76
where is passwords stored in linux
/etc/shadow file
77
what does $ mean on the command line
regular user
78
what does # mean
root users
79
what does "whoami" command do?
shoes username
80
what does "grep" command do?
search for input within a file
81
what does "pwd" command do?
print working directory
82
what does "ls" command do?
list the directory
83
what does "ls -la" command do?
shows all the file and folders
84
what does "mkdir" command do?
makes a directory
85
what does "tar " command do?
used to compress or decompress files
86
what does "." before file name command do?
hides a file
87
what does "uname -a " command do?
prints system information
88
what does "who" command do?
shows who is logged into the ystem
89
what does "type [command]" command do?
is use to find where is a command taken from
90
what does "locate" command do?
is used to find a command on the directory that is not on your path.
91
what does "history" command do?
is used to show commands type
92
what does "alias" command do?
is used to create shortcuts.
93
what does "source" command do?
used to add a file to the current shell
94
what does "touch" command do?
is used to change the timestamp of a file. if no file exist it will create the file
95
what does "fg" command do?
bring a task to the foreground
96
what does "bg" command do?
bring any task to the background
97
what does "ruser" command do?
like who but for the list of host or all machines on a network.
98
what does "finger" command do?
used to find user information.
99
what does "losf" command do?
list of open files
100
what does "df " command do?
reports the file system disk space usage
101
what does "du" command do?
report estimates of file space usage
102
what does "top" command do?
shows the processing running.
103
what does "adduser" command do?
used to create a user account
104
what does "passwd -l username" command do?
disable account
105
what does "passwd -r" command do?
delete an account
106
what does "groupmod" command do?
change the groups definitions
107
what does "usermod -a G groupName userName" command do?
added a user to a group .
108
what does "deluser user GROUPNAME" command do?
delete a user from a group
109
Systemctl [options] COMMAND [NAME]
used to manage a command
110
Service NAME [COMMAND]
used to manage commands.
111
security hash
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
TTL for linux is
64
113
What does updatedb do?
it updates the database for file names. it is updated once a day.
114
What does 'id' command do
shows username
115
what does w command do
logged on users
116
what does who -a
user information
117
what /etc/shadow
shows local user hashes
118
/etc/passwd
shows local users
119
/etc/group
local groups
120
/etc/rc.d
startup services
121
etc/init.d
Service
122
/etc/hosts
known hostnames and IP