Tuesday, May 10, 2011

Perintah Dasar / command Putty


Putty only displays command prompt of a remote Linux computer in Windows.
The commands that you type in are simply Linux commands. They are not putty commands. Here are few examples:

ls - to list files in a directory:
Code:
ls handbook-draft.pdf  iso ls -lh total 3.4M -rw-r--r-- 1 pavlo pavlo 3.4M 2007-05-15 05:53 handbook-draft.pdf drwxr-xr-x 2 pavlo pavlo 4.0K 2007-04-10 00:25 iso ls iso/ rhel-5-client-x86_64-disc6.iso 
cd - change directory (navigate to some directory):
Code:
cd iso 
cp - copy a file:
Code:
cp ../handbook-draft.pdf . 
mv - move a file (also used to rename files):
Code:
mv handbook-draft.pdf howto.pdf 
rm - remove a file:
Code:
rm handbook-draft.pdf 
mkdir - make directory:
Code:
mkdir new 
pwd - show your current location:
Code:
pwd /home/pavlo/example/iso 
whoami - find out which user you are:
Code:
whoami pavlo 
date - display date and time
Code:
date Tue May 15 06:07:45 UTC 2007 
some commands are distribution specific, such as apt in Debian. Example:
Code:
apt-get install expect 
which downloads and installs "expect" package.

man - most important of all commands (opens manual pages for other commands):
Code:
man expect 
q - quit or exit an application (for example when done reading man page, type q to exit).

Here I found a list of some Linux commands: Linux bash commands - MAN Pages

Try some

1 comment: