View unanswered posts | View active topics It is currently Thu Nov 30, 2023 11:26 am

Reply to topic  [ 2 posts ] 
 Some useful commands of linux for beginners 
Author Message
Junior Member

Joined: Sun Feb 04, 2007 11:36 pm
Posts: 1
Post Some useful commands of linux for beginners
Below mentioned are the few commands of Linux server to access it via shell:

Basic Linux Commands:


List files/directories in a directory; can compare to dir command in windows/dos.

ls –l:

Shows all files, directories, and details attributes for each file.


Change directory. For Eg > your current directory is: /home/abc/public_html and want to move to the directory /etc/apf, then the command would be:

root@server [/home/abc/public_html] # cd /etc/apf

cd .. :

Move one step up on from current directory.


Display the content of files.

Cat >> filename.htm

Create the filename.htm file at current location. You can write the content of the file and save it using the key ctrl + c


Delete a file.

rm filename.txt :

Delete filename.txt and ask if you really want to delete it. Need to press Y for Yes and N for No.

rm -f filename.txt:

Delete file name without asking Yes or No.


Copy the file.

cp filename1 filename123

It will copy the filename1 and create the file filename123 with the same content.


Online Manual Help. You can place any command after man.
For Eg. > man ls (it will display the all option and how they work for ls command)


Shows what directory you are in.


Rename the file. For E.g. mv file1 file2.htm (It will rename the file1 to file2.htm at current location. You can mention the path as well).


Create the directory. For E.g mkdir nancy (It will create the directy named ‘nancy’ at the current location. You can mentione the path where you want to create the directory.).


How much memory is used & un-used.

top :

To view top Processes with PID (Process ID number)

kill -9 PID > PID means the process ID number which you have to provide

to kill the process


Show the process state of current user

ps –A:

Show the process state of all users

ps –aux:

Show the system processes running on the server

df -h:

Check disk space usage of hard disk drives on the server. It shows total disk space size, used disk space, available disk space, * percentage of disk space used.

fdisk -l :

To check the disk partition on the server:


Disk usage for the current directory and all subdirectories

du –h:

Show results in human-readable form (kb & MB)

du -sh ./* :

view individual directory sizes of particular user/domain:

du -csh ./*:

Disk Space used for the particular domain


List all mounted file systems.

exim –bp:

To check the mail queue


Linux based hosting

Mon Feb 05, 2007 12:35 am
Report this post
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
© Copyright 2003-2008 The ultimate PHP Editor and PHP IDE site.