Exam_1 Flashcards Preview

IT1510_Linux > Exam_1 > Flashcards

Flashcards in Exam_1 Deck (169):
1

In 1957 AT&T Bell Labs creates what?

BESYS Operating System.

2

What can the BESYS Operating System do?

Batch and control jobs.

3

Who did AT&T partner with in 1964?

GE and the Massachusetts Institute of Technology.

4

What OS did GE and MIT create?

The Multiplexed Information Computing Service MULTICS.

5

What does MULTICS offer?

An interactive, multi-user time sharing interface.

6

What year did AT&T pull out of the MULTICS project?

1969.

7

Who finds an unused PDP-7 computer and begins writing an OS that has the most useful features of MULTICS and creates a new programming environment?

Ken Thompson.

8

What was the new operating system called?

UNIX.

9

Who is primarily recognized for writing the UNIX kernal, command interpreter, utilities, text editor and assembler for MULTICS?

Dennis Ritchie.

10

Who wrote the game space travel?

Ken Thompson

11

Who coined the project name UNICS and what year did this occur?

Peter Neunamm in 1970.

12

Which operating system could support multiple simultaneous users?

UNIX.

13

As PDP-7 was ending what new coding language was written to help the portability of UNIX?

C.

14

Why was Unix ported to a PDP-11?

The creators thought it would be useful for text processing.

15

Who provided funding and the first commercial use of UNIX?

Bell Labs.

16

What are some important concepts of UNIX?

Written in C, implementation of pipes, collection of programs, write programs that work well, together and handle text streams for universality.

17

What is BSD?

Berkeley Software Distribution.

18

Who released BSD and when did this occur?

Researchers at Berkeley under the support of Ken Thompson in 1976-1977.

19

Were academic licenses of Unix expensive?

No, they were cheap.

20

Who were initial users of UNIX?

Many of the research universities.

21

Which platform was the TCP/IP protocol suite (which was the foundation of the internet) performed on?

UNIX.

22

Who developed GNU and when?

Richard Stallman in 1983.

23

What is GNU?

Non copy right software that gives all users the freedom to redistribute and change GNU software.

24

Which two operating systems are not directly linked to UNIX?

Mintx and Linux.

25

What was the motivation for an open systems foundation?

AT&T and Sun were working on a project to bring the best features of Unix into a single version.

26

What was the result of the UNIX Wars?

AT&T and others formed UNIX International which turned out to be more about politics than technology. In the end each group produced its on distribution of Unix leading to several sub operating systems.

27

Who wrote the first version of the GNU General Public License (GPL)?

Richard Stallman.

28

Who announced the Linux kernal and when?

Linus Torvalds in 1991.

29

When was the Linux kernal released under GPL?

1992.

30

What year did Novell purchase UNIX and add GNU utilities and applications to Linux?

1993.

31

In 1994 which version of the Linux Kernal is released?

1.0.

32

In what year is Unix sold to Santa Cruz operation (SCO) and Linux ported to DEC Alpha and Sun SPARC processors?

1995.

33

In 1996 which version of the Linux Kernal is released?

2.0.

34

What is significant about Linux in 1998?

IBM, Compaq, and Oracle all support Linux.

35

In 2000 which version of the Linux Kernal is released?

3.0

36

Ture/False: Linux is the base OS on many mobile platforms (cell phones, PDA's).

True

37

Ture/False: Debian is a base OS of Ubuntu?

True

38

What is the command to find your present working directory?

pwd

39

Which command shows you a listing of files?

ls

40

Which command shows you a listing of files including hidden files?

ls -a

41

Which command shows you a long listing of files?

ls -l

42

When issued as a command, what does "." signify?

The present working directory.

43

When issued as a command, what does ".." signify?

The parent working directory.

44

What action does cd .. perform?

Takes the user back to the parent directory.

45

What command creates a directory?

mkdir

46

What must you use with the mkdir command when using a name with a space?

quotes surrounding the name of the directory.
mkdir "space shuttle"

47

What command deletes a directory?

rmdir

48

What command deletes multiple directories?

no quotes surrounding two directory names.
rmdir earth moon

49

True/False: Linux uses file extensions to identify file types.

False: Linux reads the content of the file to determine file type.

50

How do you run an application in the Linux command line?

Navigate to the directory or provide the extension to the directory where the application lives and enter the following command.
For example:
./color

51

How do you see what is inside of a file?

Use the CAT command.
For example:
cat color

52

Give an example of the more, less command.

cat file |more
cat file |less
space bar to move forward and B key to move backward.

53

What does GREP allow the user to do in command line?

GREP allows the user to search out key words.
For example:
cat file |grep word

54

What is globbing?

Globbing is a wildcard. It will return only those items you are looking for. * is the wildcard.
For example:
ls *.jpg

55

What is touch?

Touch modifies the last date/time stamp of a file. touch will also create a file.
For example:
touch file
This updates the current file's date/time stamp.
touch file_new
this creates a new file.

56

What command would you use to look up an ip address?

ip address for any user or ifconfig if logged in as the root user.

57

Give an example of a ping command.

ping 127.0.0.1

58

How do you stop a runaway command such as ping?

On the keyboard type CTRL + C

59

What action does the command wget perform?

This command will "get" a file from a web server and download to your machine.
For example:
wget http://classfiles.esage.com/lintro/labfiles/samplefiles.tar will download the sample files for this class.

60

What is a tar file?

A tar files is the equivalent of a windows zip file.
tar -xf samplefiles.tar will extract the zipped files you downloaded with the wget command.

61

What action does the which command perform.

The which command will display the absolute path of the program that would run if you typed the command with your current settings at your current directory.
For example:
which ls
which wget
This directs the user to the location of the program running for a particular command.

62

Which commands are available to provide help documentation located within the terminal?

man
info
For example:
man ls
This will provide help documentation for the ls command.

63

What does the following command action?
cd ~

Changes directories to your users home directory, the tilde “~” is a special character that provides an absolute path to your user’s home directory.

64

What command will allow the user to see what type of file a particular file is?

file rush
This will display the file type.
For example:
The file rush is an ASCII text file.

65

What action does the following command perform?
cat rush|wc

This will display the "word count" of the file.
For example this is the return:
3 22 109
3 = the number of lines in the file.
22 = the number of words in the file.
109 = the number of bytes in the file.

66

What action does the commands head and tail perform?

The commands head and tail allow you to see the first, or last part of a file respectively. By default they show 10 lines.

67

If searching a file for words that have orange in them, what command would you use?

cat colors|grep orange

68

If searching a file for words that have orange in them and you wanted to ignore case-sensivity, what command would you use?

cat colors|grep -i orange

69

If searching a file for words that begin with orange in them, what command would you use?

cat colors|grep -i ^orange

70

What command copies a file?

cp
For example:
cp myfiles filelist

71

What command moves a file?

mv
For example
mv myfiles yourfiles

72

What command deletes a file?

rm
For example:
rm yourfiles

73

What commands will allow the editing of files?

nano and vi and the file name.

74

What is the first line in the bash script that tells the shell what type of script is being executed? AKA Shebang

#!/bin/bash

75

Before you can run a script what security access must be granted?

chmod +x scriptname

76

What action does "echo" perform?

Echo outputs the command definitions on the terminal screen.

77

What is a variable?

A variable is essentially a token where the variable is assigned to a particular name or file and starts with a $ and ends with a white space.

78

What can be done with a variable name to avoid confusion in programming?

Use { } around the name of the variable.

79

If you referenced an undeclared (used) variable what will it return?

An empty string.

80

What does it mean for a variable to have script scope?

Variables do not retain their values from one script to the next or to the command shell.

81

What must you do to use a variable defined in the interactive shell script?

Export the value.

82

Can scripts be enclosed in either double or single quotes? What is the difference?

Yes.
Single quotes do not allow variable expansion.
Double quotes do allow variable expansion.

83

Using the brace expansion how can a user create multiple files at one time?

touch file_{one,two,three}.txt
This creates three files called one.txt, two.txt and three.txt.

84

Regarding exit codes, what does a status of 0 indicate?

That the command exited successfully. A status of anything else is considered an error condition.

85

Describe the test program.

Test is a program that evaluates expressions. It can perform many types of evaluations not typically provided directly in a programming language.

86

The [ file is a link to what program?

Test

87

What will the output of the following commands be?
color='red'
echo 'My favorite color is $color'

My favorite color is $color.

88

What will the output of the following commands be?
color='Red'
echo ${color^^}

RED. The ^^ capitalize the return of RED.

89

What does the special variable $? contain?

the exit code from the last program that completed.

90

True/False: The while loop statement will continue to loop through a script until a false condition is encountered.

True.

91

What is the pipe command used for?

To send the output of one program to the input of another program.

92

What is the expr program used for?

The expr program performs math in the terminal.
For example:
expr 3 + 4 returns 7
Each parameter must be separated by a space.

93

What type of math can BASH perform?

Bash performs integer math.

94

What is SED?

SED is a stream editor. It's most basic use is to replace one string with another.

95

What is GREP?

Regular expression string matching. GREP takes a file and returns all lines that match the specified pattern.
For Example:
grep lazy file.txt will return all lines in file.txt that have the word "lazy" in them.

96

What is AWK?

AWK is a language for manipulating text files.

97

What are some examples of what AWK may be used for?

Tallying information from text files and creating reports
Adding additional functions to text editors
Translating files from on format to another
Creating small databases
Performing mathematical operations on files with numeric data.

98

What is bootstrapping?

the process by which the computer loads the operating system AKA "booting."

99

What is the typical boot process?

BIOS selects boot device and transfers program control to boot code on device.
Boot loader read from boot device's Master Boot Record (MBR).
Load and initialize kernel.
Device detection and initialization.
Create kernel process.
Administrative intervention (single user mode).
Execution of startup scripts.

100

What is the BIOS?

Basic Input Output System.
Firmware and is stored in the EEPROM.
First software to run.
Initializes and test hardware.
Selects the boot device.
Loads the operating system.
Common interface for applications to access basic hardware.
Provides functionality to drive controllers and network cards.

101

What is the boot loader?

Software that is used to load and start an operating system.
Has options and menus allowing the user to make selections at boot.
GRUB2 is the common boot loader for Linux.
NTLDR is the common boot loader for Windows.
Capable of launching multiple OS.

102

Where in the file structure is the initial operating system that gets executed to start the OS located?

/boot/vmlinuz

103

What functions does the kernal perform?

Basic functions to load a minimalist OS and has memory management, process control, and support for a limited set of hardware.

104

After hardware detection what starts several processes that are required for the system to run?

The kernal

105

What process is created with a process ID of 1?

The init process.

106

What are some of the processes that Linux creates?

kthreadd - thread scheduling daemon
kswap - supports virtual memory management
ksoftirq - support soft interrupts
khubd - support for USB devices

107

What is the command to view running processes.

ps ax

108

Which processes are kernel processes?

Those surrounded by [ ]

109

What is single user mode?

A Linux maintenance mode.

110

When is single user mode used?

When something has gone wrong with the system and repairs need to be performed and is entered by passing a command to the kernel at boot time. It only mounts the root system by default.

111

What will allow you to boot to single user mode?

GRUB

112

Startup and configuration of the OS is handled by what?

Startup scripts that are all modifiable.

113

How many run levels does init define?

6
They are:
0 - System Shutdown
1 and S - Single user mode
2-5 - network support. 5 starts the GUI
6 - reboot

114

Which command will show you the current run level?

runlevel
You must have root privileges to run this command.

115

How do you change the run level?

With the telinit command.
For example:
telinit 0 shuts down the OS.

116

What configuration file tells init what script to run for each run level?

/etc/inittab

117

What script is typically used to execute the scripts for a specific run level by passing the run level as an argument?

/etc/init.d/rc

118

In place of inittab, what does Ubuntu use to execute run level scripts?

upstart located in etc/init

119

Where are the master copies of the startup scripts found?

/etc/init.d

120

Each startup scripts has three parts. What are they?

start - used to start the daemon
stop - used to stop the daemon
restart - stops and restarts the deamon

121

How can you manually start and stop services?

/etc/init.d/ssh start
service ssh start

122

What directories correspond to the different run levels?

/etc/rc[0-6].d

123

The files in /etc/rc[0-6].d are symbolic links to the scripts in what directory?

/etc/init.d

124

When moving from a lower run level to a higher run level what process is taking place and what scripts are executed?

The boot process is being run and all scripts that begin with the letter S (START) are being executed.

125

When moving from a higher run level to a lower run level what process is taking place and what scripts are executed?

The shutdown process is being run and all scripts that begin with the letter K (KILL) are being executed.

126

What is the proper method that should be used to shutdown the system?

Use the shutdown command.

127

What are command options that are available for shutdown?

-r reboot the system
-h halt the system and power off
-H halt the system after shutdown
-P power off after shutdown
- cancel shutdown (if scheduled for a later time)

128

What options exist for time and shutting down the system?

Now
Later by specifying hh:mm or +m for minutes from now.

129

Give an example of a shutdown command.

shutdown -h now
shutdown -h 17:04 please exit system

130

What command is used to reboot the system?

The reboot command.

131

What are features of the UEFI?

Secure boot
Provides i/o to basic hardware

132

What is the first process of Linux?

Init

133

Which option of the shutdown command is required?

Time

134

What commands will shutdown the computer?

telinit 0
shutdown (with arguments)
halt

135

What is the name of the script that runs the other configuration scripts in proper order to change run levels?

/etc/init.d/rc

136

Which run level will reboot the system?

Run level 6

137

What is contained in /etc/rc1.d?

Scripts necessary to change to single user mode. They are all symbolic links.

138

Which file in which location will configure the default behavior for GRUB2?

/etc/default
file grub

139

Which directory contains menu definitions?

/etc/grub.d

140

Where is the actual configuration file used by GRUB at boot time located?

/boot/grub
file grub.cfg

141

What is the command to read the GRUB2 configuration scripts and generate /boot/grub/grub.cfg?

update-grub
This must be done whenever changes to grub are made as the changes are done in a temporary file that is written after confirmation of changes is approved.

142

What is the file to add custom file options to GRUB2?

/etc/grub.d
file 40_custom

143

Name some security concepts that apply to Linux systems.

Each object has an owner that has broad control of an object.
The user that creates an object owns it.
The root account can act as an owner of any object.
Root has special abilities to perform administrative tasks.

144

What are the permission structures of an object?

The owner (U)
The group (G)
Everyone else (O)

145

What are the three permissions assigned to the three permission groups?

r-read
w-write
x-execute

146

How are security permissions queried?

Use the command ls -l
-rwxrwxrwx

147

Define the following:
-rw-r--r-- 1 craig staff 17183 Mar 1 20:12 jfif3.pdf

Owner has read and write access
Group has read access
Everyone else has read access
Craig is the owner
Staff is the group
17183 is the file size
MAR 1 is the date last modified
20:12 is the time last modified
jfif3.pdf is the file and type

148

What command sets permissions

chmod
For example
chmod +x jfif3.jpg

149

Change owner permission from 000, no permissions to owner rwx, group rx, everyone else rx.

chmod u+rwx rush
chmod go+rx rush

150

Write a command that will change the user and group of a file to both root and root.

Must be done with a user that has administration rights
chown root:root rush
or if your user has rights
sudo chown root:root rush

151

What is the command to change only the group?

chgrp root rush
or
sudo chgrp root rush

152

What directory are users defined in?

/etc/passwd

153

What directory are groups defined in?

/etc/group

154

What command will show the current processes?

ps
ps -u shows additional details about processes
ps -au shows all processes in detail that were started in an interactive session
ps -aux shows all processes in detail
ps aux|grep ^root shows all processes that are owned by root

155

What are the principals of role based access control?

Users access is defined by their organizational role.
Groups are built to represent organizational roles.
Users are added to groups based on their business roles.
Permissions are given to groups rather than users.
People are moved in and out of groups.
Provides a flexible security model.

156

Permissions are handled by what types of lists?

Access control lists.

157

Current Access control lists are implemented with ______ which is modeled after ______________.

NFS2.4, Windows ACL architecture

158

Define third party authentication.

Where another system is trusted to provide logon authentication for the access control to your system.

159

Which third party authentication method is the most common?

Kerberos

160

What is Kerberos?

A cryptographic mechanism that is designed to provide secure 3rd party authentication from across a network.

161

What user ID is root assigned by the system?

User ID 0

162

What are some root powers?

Change ownership of files.
Change the root directory of a process.
Create device files.
Set clock.
Manage resources limits and process priorities.
Set system's hostname.
Configure network interfaces.
Opening privileged network ports.
Shutting down the system.

163

What command will allow you to switch to another user?

su

164

What command will let you run the command as root when not logged into the root user account?

sudo

165

What commands allow sudo to launch a root shell?

sudo -i creates a shell as root and loads root's environment.
sudo -s switches to root shell but keeps current user's settings.
sudo -U username can be used to run a program as another user other than root.

166

What does the file /etc/sudoers contain?

A list of users that have root permissions.

167

Give an example of a command that may be used to add a user with full root permissions.

username ALL=(ALL:ALL) ALL
List your permissions with sudo -l
=()

168

What are features of a good password?

They are long.
they are random.
they are secret.

169

Which passwords offer the best security?

Long passwords with phrases.