Exam_2 Flashcards Preview

IT1510_Linux > Exam_2 > Flashcards

Flashcards in Exam_2 Deck (194):
1

What is address space?

Contains the memory address space for processes to use and contains the kernal data structure, code, libraries, variables and stacks.

2

What is PID?

Process ID; Unique identifier for each process.

3

What is PPID?

Parent Process ID; The identifier of a process that started another process.

4

What is UID?

The user ID of the user that created the process.

5

What is EUID?

Effective User ID; The UID that is used to check permissions. It is normally the same as the UID however different when the setuid property of a file is configured, then it is the UID of the owner of the file.

6

What is GID and EGID?

The group and effective group ID's. Functions fimilar to ID and EUID but for groups.

7

What is meant by the term Niceness?

The processes scheduling priority.

8

What is a Control Terminal?

Defines standard in, out and error for process and for non-daemon processes.

9

What is meant by the term Creation?

That each process must be created from an existing process.

10

What is the purpose of the fork system call?

It is used to create a new process. The process is a copy of the starting process.

11

What occurs after the fork system calls a new process?

The new process will change the program running and rest memory allocation to a default state.

12

At boot time what is the first process started and what is the PID?

Init with a PID of 1. Init controls the execution of the startup scripts.

13

When a process ends it sends an exit code to the parent process. What does a code of 0 indicate? A code of any other number?

0 indicates that the process completed successfully. Any other number indicates the process did not complete successfully.

14

What must occur before a process can die?

The parent process much acknowledge its demise.

15

If the parent process dies before the child process, what is the child process referred as?

An orphan.

16

When an orphaned process dies where is the result process sent to?

Init.

17

What are signals?

Process level inputs.

18

What is an interrupt?

A mechanism where one process/device can set a flag telling another process that it needs attention.

19

True/False: Interrupts are used though out computer design both at the hardware level and at the software level.

True.

20

What command is used to get a list of signal for your OS?

kill -l

21

For what purposes are signals sent?

A means of communication.
To kill, interrupt or suspend a process.
By an admin using the kill command.
By the kernal when a hardware error occurs.
By the kernal to notify a process of interest when a child process dies.

22

For a process to receive a signal it must have a

Signal handler program.

23

What is a signal handler?

A subroutine designed in the program that gets executed when a signal is received.

24

If a program does not have a signal handler registered what action is taken?

The kernal will take a default action.

25

What occurs when a signal is blocked?

It is queued for later processing.

26

True/False: Signals cannot be ignored.

False, they will be ignored if not queued.

27

Are signals able to terminate a process?

Yes

28

True/False: Some signals can cause a core dump.

True

29

List the action: KILL 9

Terminates the process and cannot be ignored.

30

List the action: STOP 19

Suspend execution.

31

List the action: TSTP 20

Request to stop a process.

32

List the action: CONT 18

Resume a stopped process.

33

List the action: INT 2

Request to KILL, if not implemented the kernal sends KILL. Process will clean up then KILL.

34

List the action: TERM 15

Cleanup and terminate.

35

List the action: HUP 1

Reset software.

36

List the action: QUIT 3

Similar to TERM but causes a core dump.

37

What is the action of the following command: kill 100

Sends TERM to process with PID of 100 but does not guarantee a process will end.

38

What is the action of the following command: kill -9 100

Guarantees process with PID 100 will die.

39

What is the action of the following command: kill -KILL 100

Guarantees process with PID will die.

40

What is the action of the following killall command: -z

Context pattern.

41

What is the action of the following killall command: -e

Exact.

42

What is the action of the following killall command: -g

Process group.

43

What is the action of the following killall command: -i

Interactive.

44

What is the action of the following killall command: -o

older-than TIME.

45

What is the action of the following killall command: -q

Quiet.

46

What is the action of the following killall command: -r

regexp.

47

What is the action of the following killall command: -s

signal signal.

48

What is the action of the following killall command: -u

user user.

49

What is the action of the following killall command: -v

verbose.

50

What is the action of the following killall command: -w

wait.

51

What is the action of the following killall command: -y

younger-than TIME.

52

What is the action of the following killall command: -I

ignore-case.

53

What is the action of the following killall command: -V

version.

54

What is the action of the following killall command: --

name.

55

Define the process state: Runnable

Process is running or can be run.

56

Define the process state: Sleeping

Process is waiting for a resource or an event.

57

Define the process state: Zombie

Process is dead but has not yet been removed from the process table (no longer used).

58

Define the process state: Stopped

Process is paused (STOP signal)

59

What does the ps command list?

The processes that are running and shows the PID, terminal, time and process name.

60

What is the effect of ps a

Shows all processes

61

What is the effect of ps l

Shows the long version and includes more technical information like niceness.

62

What is the effect of ps x

Shows processes that were not started by a terminal.

63

What is the effect of ps u

Shows more detail about the process.

64

What is the effect of ps f

Full listing including command arguments.

65

What is the effect of ps au

Shows all processes in detail that were started from and interactive session.

66

What is the effect of ps aux

Shows all processes in detail.

67

What is the effect of ps aux|grep ^root

Shows all processes that are owned by root.

68

True/False: All processes take turns using the CPU.

True.

69

How does the CPU schedule the order in which processes run?

With a numeric scheduling priority.

70

What does a processes "niceness" refer to?

How flexible the process is will to be in scheduling its operation.

71

What numbers does Linux use to indicate "niceness"

-20 to 19. -20 is the least flexible where 19 is the most flexible.

72

What does the command renice perform?

Changes a process's niceness number using PID, user or group of the process.

73

What does the top command perform?

Tracks real-time process usage and continually updates the process list by most active process.

74

What is a background process?

A process that after the shell starts the process, the shell is immediately available for another command.

75

Processes that run in the background are referred to as?

Jobs

76

When a background process is started what will it respond with?

The background job number and the process ID.

77

When a background job is complete will it return a message to the terminal?

Yes.

78

Regarding jobs, what does the fg command perform?

Brings a job to the foreground.

79

Regarding jobs, what does the bg command perform?

Sends the current process to the background after it is stopped.

80

Regarding jobs, what does the + next to the job number indicate?

Denotes the current job.

81

Regarding jobs, what does the - next to the job number indicate?

Denotes the previous job.

82

What happens to jobs when you disconnect from the terminal session?

They will terminate.

83

What command is used when you want a job to run after you close the terminal session?

nohup

84

What is the pseudo directory that is maintained by the kernal?

/proc

85

What information is contained in /proc?

Information about processes and system state.

86

True/False: /proc contains write only files.

False: Read-only.

87

Files in /proc that are not readable with CAT or MORE contain what?

Binary.

88

What creates files in /proc on the fly that do not exist until accessed?

The kernal.

89

What does stack trace (strace) show?

Signals, system calls, return values, etc.

90

When accessing resources, a process's _______ ID is used to check security.

Effective

91

What character do you add to the end of a command to run the command in the background?

&

92

What command will show CUP information?

cat cpuinfo

93

What command will show the memory configuration?

cat meminfo

94

What is in the *nix filesystem?

Files, Processes, Audio devices, Kernal data structures, Inter-process communication channels.

95

What is a namespace?

Naming and organizing model.

96

What is an API?

A set of system call to navigate and manipulate filesystem objects.

97

What is a security model?

A model to protect, hide and share filesystem objects.

98

What is an implementation?

The software components to make it all work together.

99

What is the root of a file system?

/

100

Nodes in the filesystem are seperated with what?

/s

101

Filenames may contain most characters but cannot contain what characters?

/ or the null character.

102

True/False: Filenames are not case-sensitive.

False.

103

What is an absolute path?

A path that always starts at the filesystem root.

104

What is a relative path?

A path from the current location.

105

What is the mount command used for?

To connect a device to the filesystem tree.

106

What is the command to unmount a device?

umount

107

In which filesystem are all devices shown?

/dev

108

What command shows all available devices?

cat /proc/partitions

109

What is /dev/sda

A physical disk.

110

What is /dev/sda1

The first partition on disk sda.

111

What does /mnt represent?

The mounting location of a device.

112

Give an example of a mount command.

sudo mount /dev/sdb1 /mnt/usbdisk

113

Give an example of an unmount command.

sudo umount /mnt/usbdrive

114

True/False: You can use the -f argument with umount to force a system unmount of a device.

True, but you may incur data loss.

115

What command will allow you to see who is using a file that might be in use and preventing the unmount of a device?

fuser

116

Give an example of the fuser command.

fuser -c /mnt/usbdisk

117

What file is used to configure the devices that will mount during the boot process?

/etc/fstab

118

Define the contents of the filesystem: /

The root of the directory tree.

119

Define the contents of the filesystem: /bin

Command binaries necessary for single user mode.

120

Define the contents of the filesystem: /boot

Kernal and file needed to boot kernal.

121

Define the contents of the filesystem: /dev

List of devices available to the operating system.

122

Define the contents of the filesystem: /etc

configurations files for the system.

123

Define the contents of the filesystem: /home

Users home folder.

124

Define the contents of the filesystem: /lib & /lib64

Shared libraries.

125

Define the contents of the filesystem: /mnt /media

Common mounting locations.

126

Define the contents of the filesystem: /proc

virtual filesystem containing information about kernals and processes.

127

Define the contents of the filesystem: /root

Root's home directory.

128

Define the contents of the filesystem: /sbin

Stratically compiled binaries - utilities not dependent on other libraries.

129

Define the contents of the filesystem: /tmp

Application temporary files.

130

Define the contents of the filesystem: /usr

Several subdirectories contatin user commands, documentation, and other system information that does not change.

131

Define the contents of the filesystem: /var

Log files and other files that change while the system is running.

132

What does the commands setuid and setguid perform for executables?

It allows the file to be run with the permission of the owner/group rather than the person who executed the program.

133

What does the commands setuid and setguid perform for directories?

it allows newly created files in the directory to take on the group of the parent directory rather than the creator's default group.

134

What is setuid or setguid set with (command)?

chmod

135

What are access control lists?

They provide a mechanism to apply permission to more than the standard Unix entities: user, group, others on a file.

136

What command is used to modify a files ACL?

setfacl

137

POSIX permissions are applied in what sequence?

If the EUID of the process is the file's UID then the permissions for user:: are used.
If the EUID of the process has a specific user entry in the ACL that permission is used.
If there is no user specific entry then the users' groups are matched to group entries to find a matching group.
If no user or group entry is found the other:: entry is used.

138

POSIX access control lists add additional permission beyond the standard read, write, and execute.

False.

139

When using special characters in a filename such as the space or the pipe you much use the "escape" character before the special character. What is the "escape" character.

\

140

Which file is used to define the filesystems mounted at boot time?

fstab

141

True/False: All file systems must be mounted to the /mnt directory.

False.

142

What are two types of user accounts?

Local and Identity Management

143

What are three commands used to create user accounts?

useradd, adduser, newusers

144

Describe the command useradd.

Standard Unix tool to add users.

145

Describe the command adduser.

A script or symbolic link. In Debian a perl script is used to ask for user parameters.

146

Describe the command newuser.

Linux tool to add users in bulk.

147

What are two command used to delete users.

userdel and deluser

148

Describe the command userdel.

Standard Unix tool to delete users.

149

Describe the command deluser.

Script of symbolic link to delete a user.

150

Where are user accounts stored?

/etc/passwd

151

What are attributes of login names?

They must be unique.
Allowable characters: a-z, 0-9, upper/lowercase letters.

152

How many characters does Linux allow for usernames?

32

153

Where are encrypted passwords stored?

/etc/shadow

154

Encrypted passwords are based on what algorithms?

SHA, MD5, Blowfish

155

What is UID used for?

To set permissions and keep track of processes.

156

The root UID is always

UID 0

157

What are UID 0-99 used for?

System accounts allocated by the Debian project.

158

What are UID 100-999 used for?

System accounts not allocated by the Debian project.

159

What are UID 1000-29999 used for?

Normal user accounts.

160

What are UID 65534 used for?

Is user nobody, an account with no rights or permissions.

161

Where are groups stored?

/etc/group

162

Groups are identified by which ID?

GID and used mostly for file permissions.

163

What is GECOS?

Contains personal information like name and phone number.

164

What command allows you to change GECOS?

chfn

165

If the home directory is not mounted where is the user placed?

/

166

What command allows the user to change their default shell?

chsh

167

Where are user shells stored?

/etc/shells

168

What is best practice when creating personal groups?

A group for each user is assigned as the users primary group.

169

Where is group information stored?

/etc/group

170

What are the steps for adding users?

User signs usage policy.
Edit passwd and shadow files.
Add user to personal group and other appropriate groups.
Set the initial password.
Create chown and chmod the user's home directory.
Copy default startup files from /etc/skel

171

What commands allow you to directly edit the passwd and shadow file?

vipw -s
visudo

172

What command is used to change passwords?

passwd
-l and -u will lock/unlock the account
-s displays the account status

173

True/False: If a users home directory does not exist the user will be able to login.

False.

174

What command creates the users home directory?

mkdir /home/

175

Where are user startup scripts located?

/etc/skel

176

What command lists the users id?

id

177

What user ID will be given to the first normal user created in Debian linux?

1000

178

True/False: A new user's User ID and the user's primary Group ID must be the same.

False

179

True/False: Non root users can change their own login shell.

Ture

180

What type of disk uses constant angular velocity?

Hard disks

181

What type of disk uses constant linear velocity?

CD

182

Disk Terminology: Define platter

Individual disk

183

Disk Terminology: Define track

Circle of data around a disk

184

Disk Terminology: Define sector

A chunk of a track, smallest unit of data that can be read or written.

185

Disk Terminology: Define cluster

A group of sectors logically collected together for read and write operations.

186

Disk Terminology: Define head

Device that reads or writes data.

187

Disk Terminology: Define seek time

Average time it takes to move the head to a new track.

188

Disk Terminology: Define delay

Average time it takes to find a sector on a track.

189

What must each storage media be attached to?

A controller

190

Define SATA

Serial ATA which is an improved standard to bring higher bandwidth to ATA devices.

191

What are the different types of SATA?

SATA, SATA2, SATA3, SATA 3.2

192

Define SCSI.

Small computer systems interconnect and uses a parallel bus.

193

What are two common techniques available for combining physical disks?

RAID (Redundant Array of independent Disks) and JBOB

194

Define the various RAID levels.

RAID0 - Data is spread across multiple disks.
RAID1 - Mirroring (one disk is an exact copy of another)
RAID5 - Block level stripping distributed with parity.
RAID6 - Block level striping with redundant parity.
RAID 0+1 - A mirror of stripes.
RAID10 - A stripe of mirrors.