Shared Flashcard Set

Details

Fundamentals of Unix
Unix flashcards
69
Computer Science
Undergraduate 2
12/03/2013

Additional Computer Science Flashcards

 


 

Cards

Term
[]
Definition
Text enclosed within a pair of blue brackets will indicate the enclosed text (typically commands, arguments, or parameters) and is optional
Term
$
Definition
A dollar sign will indicate the command line prompt
Term
Italicized text enclosed in square brackets [Esc]
Definition
indicates a key press of that key
Term

A dollar sign followed by text followed by [Enter]

$ ls [Enter]

Definition
indicates the text is intended to be a command followed by a key press of the Enter key.
Term
Text on a line with no dollar sign
Definition
indicates output from the system resulting from the command on the previous line.
Term
the # character followed by text
Definition
This is to be viewed as explanatory comments, not something to type
Term
What is Unix?
Definition
Unix is an Operating System.
Term
Where was the Unix operating system created?
Definition
Bell Labs
Term
What are some of the pros of Unix?
Definition
Flexible, stable, Robust.  Multiple users can access and share resources simutaneously
Term
What programming language is Unix written in?
Definition
C programming language
Term
username
Definition
Your username is assigned to you by a system administrator.
Term
Password
Definition
your password being initially set by the administrator as well, can be changed by you at a letter time ussing the passwd command.
Term
How can you log off of Unix?
Definition
Press Ctrl d, or type exit
Term
Man pages
Definition
Online manual that provides information about interacting with a Unix system
Term
What is the basic navigation through the man pages
Definition

[Enter] will move you forward line by line

[F] or Space will move your forward page-by-page

[B] will move you backward page by page

[Q] will allow you to quit from a man page and return to shell

Term
What is the format for commands?
Definition

cmd [-options] [arguments]

 

a command can have no options nor arguments and can stand a lone.

Term
How many options and arguments can a command have?
Definition
A command can have one option and zero arguments, sever options and zero arguments, zero options and one argument, zero options and several arguments, or several options and several arguments, etc.
Term
How many options and arguments does the command $ ls have?
Definition
None.
Term
How many options and arguments does the command $ ls -l have?
Definition
One option and no arguments
Term
How many arguments and options does the command $ ls -la have?
Definition
2 options and zero arguments
Term
$ exit
Definition
terminate login session to a Linux/Unix shell
Term
$ ls
Definition
List directory contents
Term
ssh
Definition
Establish a secure connection to a remote host
Term
telnet
Definition
establsh an unsecure connection to a remote host
Term
Unix is divided into two main components.  What are they?
Definition
Kernel and Utilities
Term
Kernel
Definition
is loaded into RAM by the boot loader where it remains memory resident for as long as the machine remains powered on.
Term
utilities
Definition
programs which typically reside on a disk device
Term
shell
Definition
the mechanism which allows users to enter commands to run other utility programs
Term
Unix file system
Definition
a methodology for logically organizing and storing large quantities of data such that the system is easy to manage
Term
file
Definition
a collection of typically related data, which can be logically viewed as a streem of bytes.  A file is the smallest unit of storage in the Unix file system.
Term
A file system
Definition

consists of files, relationships to other files, as well as the attributes of each file

 

for example:

  • a file type (i.e. what kind of data is in the file)
  • a file name (which may or may not include an extension)
  • a physical file size
  • a file owner
  • file protection/privacy capability
  • file time stamp (time and date created/modified)
Term
Directories
Definition
special files that may contain other files
Term
bin
Definition
binaries, this is the directory where many commonly used executable commands reside
Term
dev
Definition
contains device specific files
Term
etc
Definition
contains system configuration files
Term
home
Definition
contains user directories and files
Term
lib
Definition
contains all library files
Term
mnt
Definition
contains device files related to mounted devices
Term
proc
Definition
contains files related to system processes
Term
root
Definition
the root users' home directory
Term
sbin
Definition
system binary files reside here
Term
tmp
Definition
storage for temporary files which are periodically removed from the file system
Term
usr
Definition
also contains executable commands
Term
Emacs and VI(Visual editor)
Definition
The two most popular Unix text editing applications
Term
What is the difference between emacs and VI editor
Definition
VI editor is a non-GUI based tool whereas emacs is available in both GUI and non-GUI modes
Term
How to open a new or existing file using vi
Definition
vi file_spec [Enter]
Term

In VI

 

:wq or ZZ

Definition
This command will write your changes and quite the editing session
Term

VI editor

 

:q

Definition
If you do not wish to save any changes since your last write
Term

VI editor

 

:q!

 

Definition
If you have made no changes since the last write
Term
What are the two modes in VI
Definition
Command mode and insert mode
Term
Three ways to insert text in VI
Definition

i - inserts text to left of cursor

a - append, inserts text to the right of cursor

o - open a new line, inserts o the line below the cursor

Term

VI editor

 

h

Definition
Move the cursor left
Term

VI editor 

 

j

Definition
move the cursor down
Term
VI editor k
Definition
move the cursor up
Term

VI editor 

 

L

Definition
move the cursor right
Term

VI editor

 

0

Definition
Moves cursor to the beginning of a line
Term

VI editor

 

$

Definition
move cursor to end of line
Term

VI editor 

 

nG

Definition

move to line number n

(3G moves to line 3)

Term

VI editor

 

G

Definition
move to bottom of document
Term

VI editor

 

x

Definition
delete a single character
Term

VI editor

 

dw

Definition
delete a single word
Term

VI editor

 

dd

Definition
delete a single line
Term

VI editor

 

nx, ndw, ndd

Definition
deletes n chars, words or lines respectively
Term

VI editor

 

u

Definition
Undo
Term
Process
Definition
An instance of a running program
Term
Process Control Block (PCB)
Definition
the structure where proccess attributes are stored.  Each individual process with have a PCB associateds with it
Term
What are the process attributes?
Definition
PID, PPID, priority, ownershit, state
Term

Command:

 

ps

Definition
Process status
Supporting users have an ad free experience!