Basic UNIX commands.

Basic UNIX commands.


Unix operating system provides powerful environment for program development. A user of a UNIX system communicates with the operating system through the commands entered at a shell prompt. The commands allow to manipulate files, edit, compile, execute and debug programs as well as communicate locally or over the network.


File system:

UNIX has a tree like file system. Each directory may contain multiple files and multiple sub-directories. A path to a file is specified by stating names of all subdirectories separated by a slash "/" leading to that file. A path may be given with respect to the current directory or the root directory. The latter begins with a slash "/". The parent directory can be specified by "..". Each user has a home directory. The home directory can be specified as "~".





Multiple files can be specified by using wild-card symbols. "*" denotes any string of characters of any length whereas "?" denotes any single character.



Each file has several access flags. The flags determine if the file is accessible for reading (r) writing (w) or executing (x). Three sets of these flags are present. One for the user himself (u), another for other users (o), and the third for user's group (g).

The directories also have the same flags. Their meaning however is the following: r - permit listing, w and x - permit changing or removing, x - permit accessing files by name.





Processes:

Every user can execute multiple executable programs -- jobs -- processes. A process can be running in the foreground, taking input from standard input devices and producing output to standard output devices. It can also be running in the background, for instance to perform prolonged computation. When in the latter state, a process don't have to communicate with standard input output devices thus freeing them for some foreground process.



To start some executable program it suffices to type the name of the file storing that program at the shell prompt. It is possible to redirect standard input and/or output of the programs so that they use some files instead of keyboard and the monitor:



The commands entered at the shell prompt are remembered and can be recalled by special commands.



To terminate session of work with the operating system, a user should execute the command: logout.


Network:

It is possible to use another Unix computer (host) remotely.




Communicating:

It is possible to communicate to other users locally or over the network. The address of the user U working on a computer H is U@H.




Searching:

Most Unix commands and application programs have their manual pages with plenty of helpful information.





Printing:




Compiling, running, debugging:




Examining and altering various setups:




Packing/Unpacking files:

Multiple files can be packed and compressed together into a single file. Most common of such archives have name extension .tar.gz. Tape archiver tar is responsible for concatenating a group of files together and compressor gzip is responsible for compressing the resulting single file.




Some utilities:




Last updated 4/26/98. Comments?