This document provides instructions for connecting to and using basic commands in a UNIX system via PuTTY. It explains that UNIX is command-based and case sensitive. It then describes the structure of UNIX commands and provides examples. Finally, it summarizes common commands for viewing system information, calendars, users, clearing screens, command history, manuals, and logging out.
This document provides instructions for connecting to and using basic commands in a UNIX system via PuTTY. It explains that UNIX is command-based and case sensitive. It then describes the structure of UNIX commands and provides examples. Finally, it summarizes common commands for viewing system information, calendars, users, clearing screens, command history, manuals, and logging out.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online from Scribd
This document provides instructions for connecting to and using basic commands in a UNIX system via PuTTY. It explains that UNIX is command-based and case sensitive. It then describes the structure of UNIX commands and provides examples. Finally, it summarizes common commands for viewing system information, calendars, users, clearing screens, command history, manuals, and logging out.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online from Scribd
Entering Commands UNIX philosophy : it assumes that users know what are they doing. UNIX is a command based system. It is important to remember all commands and what they do. Commands in UNIX are programs. UNIX is case sensitive. Date and date is not the same. Most UNIX commands are in lowercase. Structure of a UNIX Command $ command [[-]option(s)] [option arg(s)] [command arg(s)] where: $ is the shell prompt, anything enclosed in [ ] is not always needed, command is the name of the valid UNIX command for that shell in lowercase letters, [-option(s)] is one or more modifiers that change the behavior of command, [option arg(s)] is one or more modifiers that change the behavior of the -option(s), [command arg(s)] is one or more objects that are affected by command, generally files and pathnames.
Space separates command, option, option argument, and command argument,
but no space is necessary between multiple options or multiple option arguments. Also, a space is optional between the option and the option argument. Structure of a UNIX command $ command [[-]option(s)] [option arg(s)] [command arg(s)] $ ls Contains only the command ls $ ls –la Contains the command ls and two options l and a $ ls –la m* Contains the command ls, two options l and a and command argument m* $ lpr –Pps15 hw5.ps Contains the command lpr, one option P, one option argument ps15 and one command arguments hw5.ps The date Command Use the UNIX date command to display the system date, which system administrator maintains The cal Command Displays the calendar of the current month : cal
Displays the calendar of 2000 : cal 2000
Displays the calendar of
Feb 1977 : cal 2 1977 The who and finger Commands In a multiuser system, knowing who is logged into the system maybe helpful Use the who command to determine who is using the system and their current location : who Use the finger command to find out details about user : finger username The clear Command Use clear command to clear your screen; it does not have options or arguments : clear Command Line History Access the command history with up ↑ and down ↓ arrow keys. Pressing the up arrow key ↑ once recalls the most recently used command. Each time the up arrow key ↑ is pressed, an older command is recalled. Each time the down arrow key ↓ is pressed, the next command in command line history is displayed. The man Command The man command displays UNIX online manual, called the man pages, for command- line assistance : man who Press the space key to see more manual pages, one screen at the time. Press Ctrl+b to go to the previous screen. Press q to exit man program. The whatis Command Sometimes man contains more information then one wants to see. To display a brief summary of a command use whatis command. The whatis shows only the name and brief description that appears near the top of a command’s man page : whatis who The whereis Command Locates binary, source and man page files for a command : whereis who The which Command List which files are executed if the named commands are run as a command : which who The whoami Command Displays the effective current user name : whoami Logging Out of UNIX Logging out ends your current process and indicates to UNIX that you are finished. Logging out depends on the shell. In C shell, type logout. For Bourne, Korn or Bash shells type exit or press ctrl+d.