Exam_1 Flashcards Preview

IT1510_Linux > Exam_1 > Flashcards

Flashcards in Exam_1 Deck (169)
Loading flashcards...
1
Q

In 1957 AT&T Bell Labs creates what?

A

BESYS Operating System.

2
Q

What can the BESYS Operating System do?

A

Batch and control jobs.

3
Q

Who did AT&T partner with in 1964?

A

GE and the Massachusetts Institute of Technology.

4
Q

What OS did GE and MIT create?

A

The Multiplexed Information Computing Service MULTICS.

5
Q

What does MULTICS offer?

A

An interactive, multi-user time sharing interface.

6
Q

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

A

1969.

7
Q

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?

A

Ken Thompson.

8
Q

What was the new operating system called?

A

UNIX.

9
Q

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

A

Dennis Ritchie.

10
Q

Who wrote the game space travel?

A

Ken Thompson

11
Q

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

A

Peter Neunamm in 1970.

12
Q

Which operating system could support multiple simultaneous users?

A

UNIX.

13
Q

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

A

C.

14
Q

Why was Unix ported to a PDP-11?

A

The creators thought it would be useful for text processing.

15
Q

Who provided funding and the first commercial use of UNIX?

A

Bell Labs.

16
Q

What are some important concepts of UNIX?

A

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

17
Q

What is BSD?

A

Berkeley Software Distribution.

18
Q

Who released BSD and when did this occur?

A

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

19
Q

Were academic licenses of Unix expensive?

A

No, they were cheap.

20
Q

Who were initial users of UNIX?

A

Many of the research universities.

21
Q

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

A

UNIX.

22
Q

Who developed GNU and when?

A

Richard Stallman in 1983.

23
Q

What is GNU?

A

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

24
Q

Which two operating systems are not directly linked to UNIX?

A

Mintx and Linux.

25
Q

What was the motivation for an open systems foundation?

A

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

26
Q

What was the result of the UNIX Wars?

A

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
Q

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

A

Richard Stallman.

28
Q

Who announced the Linux kernal and when?

A

Linus Torvalds in 1991.

29
Q

When was the Linux kernal released under GPL?

A

1992.

30
Q

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

A

1993.

31
Q

In 1994 which version of the Linux Kernal is released?

A

1.0.

32
Q

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

A

1995.

33
Q

In 1996 which version of the Linux Kernal is released?

A

2.0.

34
Q

What is significant about Linux in 1998?

A

IBM, Compaq, and Oracle all support Linux.

35
Q

In 2000 which version of the Linux Kernal is released?

A

3.0

36
Q

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

A

True

37
Q

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

A

True

38
Q

What is the command to find your present working directory?

A

pwd

39
Q

Which command shows you a listing of files?

A

ls

40
Q

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

A

ls -a

41
Q

Which command shows you a long listing of files?

A

ls -l

42
Q

When issued as a command, what does “.” signify?

A

The present working directory.

43
Q

When issued as a command, what does “..” signify?

A

The parent working directory.

44
Q

What action does cd .. perform?

A

Takes the user back to the parent directory.

45
Q

What command creates a directory?

A

mkdir

46
Q

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

A

quotes surrounding the name of the directory.

mkdir “space shuttle”

47
Q

What command deletes a directory?

A

rmdir

48
Q

What command deletes multiple directories?

A

no quotes surrounding two directory names.

rmdir earth moon

49
Q

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

A

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

50
Q

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

A

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

51
Q

How do you see what is inside of a file?

A

Use the CAT command.
For example:
cat color

52
Q

Give an example of the more, less command.

A

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

53
Q

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

A

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

54
Q

What is globbing?

A

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

55
Q

What is touch?

A

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
Q

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

A

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

57
Q

Give an example of a ping command.

A

ping 127.0.0.1

58
Q

How do you stop a runaway command such as ping?

A

On the keyboard type CTRL + C

59
Q

What action does the command wget perform?

A

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
Q

What is a tar file?

A

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
Q

What action does the which command perform.

A

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
Q

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

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

What does the following command action?

cd ~

A

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
Q

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

A

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

65
Q

What action does the following command perform?

cat rush|wc

A
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
Q

What action does the commands head and tail perform?

A

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
Q

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

A

cat colors|grep orange

68
Q

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

A

cat colors|grep -i orange

69
Q

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

A

cat colors|grep -i ^orange

70
Q

What command copies a file?

A

cp
For example:
cp myfiles filelist

71
Q

What command moves a file?

A

mv
For example
mv myfiles yourfiles

72
Q

What command deletes a file?

A

rm
For example:
rm yourfiles

73
Q

What commands will allow the editing of files?

A

nano and vi and the file name.

74
Q

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

A

!/bin/bash

75
Q

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

A

chmod +x scriptname

76
Q

What action does “echo” perform?

A

Echo outputs the command definitions on the terminal screen.

77
Q

What is a variable?

A

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
Q

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

A

Use { } around the name of the variable.

79
Q

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

A

An empty string.

80
Q

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

A

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

81
Q

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

A

Export the value.

82
Q

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

A

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

83
Q

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

A

touch file_{one,two,three}.txt

This creates three files called one.txt, two.txt and three.txt.

84
Q

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

A

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

85
Q

Describe the test program.

A

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

86
Q

The [ file is a link to what program?

A

Test

87
Q

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

A

My favorite color is $color.

88
Q

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

A

RED. The ^^ capitalize the return of RED.

89
Q

What does the special variable $? contain?

A

the exit code from the last program that completed.

90
Q

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

A

True.

91
Q

What is the pipe command used for?

A

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

92
Q

What is the expr program used for?

A

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

93
Q

What type of math can BASH perform?

A

Bash performs integer math.

94
Q

What is SED?

A

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

95
Q

What is GREP?

A

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
Q

What is AWK?

A

AWK is a language for manipulating text files.

97
Q

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

A

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
Q

What is bootstrapping?

A

the process by which the computer loads the operating system AKA “booting.”

99
Q

What is the typical boot process?

A

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
Q

What is the BIOS?

A
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
Q

What is the boot loader?

A

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
Q

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

A

/boot/vmlinuz

103
Q

What functions does the kernal perform?

A

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

104
Q

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

A

The kernal

105
Q

What process is created with a process ID of 1?

A

The init process.

106
Q

What are some of the processes that Linux creates?

A

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

107
Q

What is the command to view running processes.

A

ps ax

108
Q

Which processes are kernel processes?

A

Those surrounded by [ ]

109
Q

What is single user mode?

A

A Linux maintenance mode.

110
Q

When is single user mode used?

A

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
Q

What will allow you to boot to single user mode?

A

GRUB

112
Q

Startup and configuration of the OS is handled by what?

A

Startup scripts that are all modifiable.

113
Q

How many run levels does init define?

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

Which command will show you the current run level?

A

runlevel

You must have root privileges to run this command.

115
Q

How do you change the run level?

A

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

116
Q

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

A

/etc/inittab

117
Q

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

A

/etc/init.d/rc

118
Q

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

A

upstart located in etc/init

119
Q

Where are the master copies of the startup scripts found?

A

/etc/init.d

120
Q

Each startup scripts has three parts. What are they?

A

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

121
Q

How can you manually start and stop services?

A

/etc/init.d/ssh start

service ssh start

122
Q

What directories correspond to the different run levels?

A

/etc/rc[0-6].d

123
Q

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

A

/etc/init.d

124
Q

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

A

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

125
Q

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

A

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

126
Q

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

A

Use the shutdown command.

127
Q

What are command options that are available for shutdown?

A
  • 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
Q

What options exist for time and shutting down the system?

A

Now

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

129
Q

Give an example of a shutdown command.

A

shutdown -h now

shutdown -h 17:04 please exit system

130
Q

What command is used to reboot the system?

A

The reboot command.

131
Q

What are features of the UEFI?

A

Secure boot

Provides i/o to basic hardware

132
Q

What is the first process of Linux?

A

Init

133
Q

Which option of the shutdown command is required?

A

Time

134
Q

What commands will shutdown the computer?

A

telinit 0
shutdown (with arguments)
halt

135
Q

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

A

/etc/init.d/rc

136
Q

Which run level will reboot the system?

A

Run level 6

137
Q

What is contained in /etc/rc1.d?

A

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

138
Q

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

A

/etc/default

file grub

139
Q

Which directory contains menu definitions?

A

/etc/grub.d

140
Q

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

A

/boot/grub

file grub.cfg

141
Q

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

A

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
Q

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

A

/etc/grub.d

file 40_custom

143
Q

Name some security concepts that apply to Linux systems.

A

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
Q

What are the permission structures of an object?

A
The owner (U)
The group (G)
Everyone else (O)
145
Q

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

A

r-read
w-write
x-execute

146
Q

How are security permissions queried?

A

Use the command ls -l

-rwxrwxrwx

147
Q

Define the following:

-rw-r–r– 1 craig staff 17183 Mar 1 20:12 jfif3.pdf

A
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
Q

What command sets permissions

A

chmod
For example
chmod +x jfif3.jpg

149
Q

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

A

chmod u+rwx rush

chmod go+rx rush

150
Q

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

A

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
Q

What is the command to change only the group?

A

chgrp root rush
or
sudo chgrp root rush

152
Q

What directory are users defined in?

A

/etc/passwd

153
Q

What directory are groups defined in?

A

/etc/group

154
Q

What command will show the current processes?

A

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
Q

What are the principals of role based access control?

A

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
Q

Permissions are handled by what types of lists?

A

Access control lists.

157
Q

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

A

NFS2.4, Windows ACL architecture

158
Q

Define third party authentication.

A

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

159
Q

Which third party authentication method is the most common?

A

Kerberos

160
Q

What is Kerberos?

A

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

161
Q

What user ID is root assigned by the system?

A

User ID 0

162
Q

What are some root powers?

A
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
Q

What command will allow you to switch to another user?

A

su

164
Q

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

A

sudo

165
Q

What commands allow sudo to launch a root shell?

A

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
Q

What does the file /etc/sudoers contain?

A

A list of users that have root permissions.

167
Q

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

A

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

168
Q

What are features of a good password?

A

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

169
Q

Which passwords offer the best security?

A

Long passwords with phrases.