This manual is designed to familiarizes
users with some of the commonly used UNIX commands. Please follow all the
instructions. The first thing we need to do is to work on a machine that
has UNIX as its operating system.
Note: In this manual, the words written in boldface, for eg. Login, indicate what will show up on the screen. The words following a % symbol and written in boldface, for eg. % passwd, are to be typed out ( without the % symbol). The words written in regular font following the % symbol and boldfaced commands are to be substituted by filename/directory names in your system or your user ID and passward as given to you by your system administrator. Step (0) : Logging into and logging out of the machine: You need a Login Id and a Password on the department's UNIX machine. These two are unique to each individual. You are given one by the system administrator. Both login names and passwords are case sensitive. 0-0) Once connected to a system you will be prompted for your login name: Login : your ID (Press Enter) Password: your password (Press Enter). Some machines will ask users to change password when they login for the first time. If you are asked to change your password, make it something that is not easy to guess. A combination of letters, numbers and special characters, up to 8 characters is recommended. Once logged in successfully, you will get a prompt, which may look like > , % or $ . This prompt is called the command prompt . 0-1) You can change your password at anytime, by typing % passwd (Press Enter). The passwd command will prompt you for the following information: Old password: your current password (Press Enter) Your new password: your new password (Press Enter) Retype your new password: your new password (Press Enter) 0-2) To logout of the system type : % logout (Press Enter) Step (1) : Basic Unix Commands File Commands
|
Directory Commands
Although you may use a different editor to edit your programs, for this example we assume you are using Pico to write your programs. 2-0) % pico hello.cpp (you may also use hello.C) 2-1) Type the following 6 lines into your blank screen #include <iostream> int main() { cout<<"Hello World, this is ME \n"; return 0; } 2-2) Once you are done, press Ctrl-x (^ X) to save and exit the file 2-3) Let's make a backup copy. At promp, type: % cp hello.cpp hello.bkup 2-4) Now let's compile hello.C type: % g++ hello.cpp (It creates a.out) 2-5) To run the hello.C program type: % a.out |
rev : July 2002