Basic Commands

As we are now aware of file system now its good to learn about basic Linux Commands that will help in our day to day life
To run all these commands please use a terminal window.
To run terminal follow following commands
Press Alt+F2
Type gnome-terminal or use xterm


OR
Click on application –> accessories –>Terminal or it may be on Application –> System Tools –> Terminal
This will open terminal in GUI mode
Commands with description
ls
This is command same as dir command in Windows/Dos.

Usages
ls –ll This will show Full details about file regarding its permission,owner name,Group,date modified/accessed, etc

ls –a Shows all files included hidden file [ dotfile ]

ls-s Shows size

while we do ls –ll command the following color is used to identify file/folder as

Dark Blue :-Folder
Black/White:- File
Green:- Executables [ execute permissions]
Sky Blue:- Services
Red Color:- RPM,Installer

Note:- Please note that Linux Files and Folders are case sensitive i.e a & A is different not like windows.

date
As the command indicates it displays time and date of the system

cal
Displays calendar of current month

To view calendar for whole year
cal 2008
Replace 2008 with your specified year

To view Calendar of particular month of year
cal 12 1987
Displays calendar of December 1987,[replace with your variables]

hostname
Displays Hostname of the system

cp :- Copy filename or Directory

Usages
cp filename destination_folder

cp /yourfolder/filename destination_folder

mv :- move or rename file/folder

Usage
For moving
mv filename/foldername destination
For renaming
mv file/folder newname

mkdir :- Create directory
Usage
mkdir foldername

rm :- Removes File/Folders
Usage
rm filename/foldername
To remove file/folder forcibly without any prompt
rm –f foldername/filename

To prompt on each removal of file and folder use this command
rm –r folder/filename

So we covered ls,date,cal,hostname,cp,mv,rm
More commands in next post

By | 2018-04-09T06:49:56-04:00 May 6th, 2008|Command, Information|Comments Off on Basic Commands

About the Author: