UNIX Basics

UNIX Commands

The Sun workstation runs Solaris 2.6, one particular implementation of the UNIX operating system. Some parts of the operating system cannot be controlled by the window interface alone, and so system commands must be entered in a terminal window instead. You may type UNIX commands in terminal windows, sometimes called shell windows, such as the one named for the site (for example iss3). If the window is iconified you will need to open it first. (See Window System Basics.)

UNIX commands are case sensitive, meaning command names with different case represent different commands. However, most UNIX commands are entirely lower case.

UNIX commands are frequently followed by a list of options to help tell the command what to do. Many options can be identified by their hyphen ('-') prefix. The options and any other parameters to the command are separated from each other by spaces. Type the command and any options or parameters into the terminal window at the terminal prompt, then press Enter to enter the command into the system and execute it. The whole line, options and all, is called a command line. The options and parameters are sometimes called arguments or command-line parameters.

UNIX provides one command in particular to lookup a summary of other commands and all of their parameters, the man command. The list below includes a synopsis of the man command, as well as several other common UNIX commands.

In the list, parameters look like this:

{parameter}

Options appear like this:

[option]

Options are of course optional and appear on the command line like they appear in the synopsis, minus the brackets. The parameters are usually required and should be replaced on the command line with the appropriate text, again without the brackets.

man {command-name}

Shows the manual page for the command named command-name in the terminal window. For example, the following command line looks up the manual page for the ls command:

95 iss2:/iss/home/iss> man ls

ls [-al]

Show a listing of files in the current directory. When using the -al option, if the first character on the listing line is a 'd', then that entry is a directory.

pwd

Show the name of the current working directory.

cd {directory-name}

Change current directory location to the named directory.

more {file-name}

Type the contents of a file named file-name to the terminal. Use the Space, Return, and Enter keys to page through the output.

Shutting Down

Naturally, sometimes the entire operating system needs to be shut down, such as when the computer needs to be turned off or when it just needs to reboot to change configurations or to clear up a problem.

Important

Take careful heed of this paragraph:

Remember that computers running the UNIX operating system cannot just be turned off like older DOS computers. UNIX keeps some disk information in memory where it can be accessed more quickly, before writing the changes to the disks. This means that pulling the plug on the operating system may leave the disks in an inconsistent and confused state. Obviously this cannot always be avoided, such as for power outages, and usually the system can recover. However, there is always a chance of permanent damage and hence the system should be shut down cleanly whenever possible.

The ISS software includes a program to help shutdown or reboot the system. To reboot the system, enter this command at any terminal prompt:

35 iss2:/iss> iss reboot

To halt the system so that the power can be turned off or disconnected, enter this command:

35 iss2:/iss> iss halt

During shutdown, the window system will quit and lots of messages may scroll down the console. If the system is rebooting, you may notice a system reset when the screen blanks, and then the system will begin its usual boot process. (See Starting the System.) If halting, the shutdown will be completed once the low-level hardware prompt appears, either > or ok. Once the low-level prompt appears it is safe to turn off the workstation.