Logging In and Using Basic SunOS Commands
This chapter describes the following topics.
To enter commands, use a terminal or window. Use your desktop environment documentation if you need information on starting a terminal or window.
Logging In
A standard work session is the interval between the time you log in to the system and the time you log out. The SunOS multiuser environment requires that you identify yourself each time you want to use the system. Your login name (also known as a user name or an account) serves as your identity to the system and to other users on the system. Your password restricts use of your account to you. If you don't already have a login name and password, ask your system administrator to set up an account for you. After you have this information, you are ready to log in.
Before you log in to the system, your screen should look similar to the following:
hostname console login: |
Type the login name given to you by the system administrator and press the Return key. For example, if your login name is spanky, type:
hostname console login: spanky |
and press Return. Next, the system requests your password as follows:
hostname console login: spanky Password: |
Type your password at the prompt and press Return. If your account does not have a password assigned to it, the system logs you in without asking you for a password. Note that the system does not display (echo) your password on the screen as you type it. The failure to display your password helps to prevent others from discovering your password.
Your Login Shell
In the chapters that follow, you enter SunOS commands. When you issue a command to the system, you are actually providing information to a command interpretation program, called a shell. The shell program then reads the information you have provided and causes the proper action to occur within the system.
The default shell for SunOS system software is the Bourne shell. The Solaris operating environment also supports the following shells.
GNU Bourne Again shell (bash)
C shell (csh)
Korn shell (ksh)
TC shell (tcsh)
Z shell (zsh)
Each of these shells has its own unique differences.
Note - You can get specific information about any SunOS command, including each of the available shells, by viewing its man (manual reference) page. For more information on man pages, see "Displaying Manual Pages With man".
When you initially log in to the system (or open a new terminal or window) and you see your command prompt, it indicates that a shell program has been started for you automatically. This shell is called your login shell. If your login shell is not the SunOS default (the Bourne shell), it is because a different shell has been specified for you by your system administrator.
Some commands or procedures available when using one shell might not be available when using another shell. Unless stated otherwise, all commands and procedures described in this manual are available in the Bourne shell.
Logging Out
When you have finished your work session and are ready to exit the operating system, log out by typing the following:
$ exit |
After a moment, the system once again displays the login prompt:
$ exit hostname console login: |
When you see the login prompt, it indicates that you have successfully logged out. The system is now ready for you or another user to log in.
Note - In the SunOS operating system, turning off your workstation or terminal does not necessarily log you out. Unless you log out explicitly, you might remain logged in to the system.
Keyboard Equivalents
You can often speed up operations by using a sequence of keystrokes, called keyboard accelerators, that duplicate the operations of the mouse and menus, and of the preconfigured keyboard keys.
The following table lists several command operations and the keyboard equivalents for both SPARC and IA machines.
Note - The Meta key is the <> key on SPARC keyboards and is obtained on IA keyboards by pressing Ctrl-Alt.
To use a keyboard accelerator, press and hold the first key (Meta or Ctrl-Alt together) and type the second key. For example, to cut selected text, press and hold the Meta key and press X on a SPARC system. On an IA system, press and hold Ctrl and Alt together and press X simultaneously.
Table 2-1 Keyboard Accelerators
Operation | Keyboard Equivalent | Action |
---|---|---|
Meta - a | Repeats the previous operation | |
Meta - c | Copies the selection to the clipboard | |
Meta - x | Cuts the selection and puts it on the clipboard | |
Meta - f | Finds the selection to the right of the caret | |
Help or F1 | Displays a help window with context-sensitive help for the object at the pointer location | |
Meta - n | Loads a new file | |
Meta - o | Opens a file (for example, if you've highlighted a file icon in File Manager) | |
Meta - w | Opens an icon or closes a window to an icon | |
Meta - v | Copies the clipboard selection to the insertion point | |
Meta - p | Sends the file to the printer (for example, if you've highlighted a file icon in File Manager) | |
Meta - i | Displays the property window for the application at the pointer location | |
Shift-Meta - p | Undoes an Undo | |
Meta - s | Saves the current file | |
Stop or Esc | Stops the current operation | |
Meta - u |
Command Prompt
When you log in, the screen or window displays an initial prompt. The appearance of this prompt varies depending on the shell you are using and on how your system administrator originally set it up. Because the default command prompt for SunOS system software is the dollar sign ($), this prompt is used in most of the examples presented in this manual.
If you decide later that you want to change your command prompt, see "Changing Your Command Prompt" for instructions.