Basic Putty Commands

The following is a basic list of command for Putty that you will need in the course:

Command Description Example
pwd

Present Working Directory

shows you the working directory you are currently in.

pwd results in   /home/userid
passwd

Change Password

Change your current password (note: you must know the current one to change it)

userid@opentech:~$ passwd
Changing password for userid.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
userid@opentech:~$

cd

Change Directory

Now, you are at a location and you want to navigate to another. Type “cd /location” and you will reach that location. It stands for “change directory”. “cd .” makes you stay at the same directory you are at. “cd ..” makes you shift one directory back. For example, you are at “/home/task/files” and you type “cd..” and hit enter. This will move you to “home/task”. “cd -” makes you go to the previous location you were at. For example, you were at “/home” but you moved to “/dir”. Typing “cd-” command will take you back to “/home”. “cd ~” will take you to your home directory and “cd /” will take you to root directory.

mkdir

Make Directory

ls

List Directory

cp

Copy

mv

Move

rm

Remove

touch

Create File

cat

Display Content

zip

Compress ZIP

unzip

Uncompress ZIP

grep

String Search

find

File Find