Red Hat Linux Basic Commands

Basic Commands :

ls –l                                                                 List Directories

ls –a                                                                 Shows Hidden Files

ls –ld /etc                                                         Will Shows /etc Properties

date                                                                 mm     dd     hh      mm       yyyy .ss

Month Date Hours Minute Year Second

cal                                                                    Calendar

cal 2008                                                          Shows 2008 Calendar

cal 2008 |less                                                   Shows 2008 Calendar In Short View

cal 2008 |more                                                Shows 2008 Calendar In Short View

tty                                                                    Terminal

ctrl d                                                                Log Out From Text Mode User

ctrl alt Backspace                                            Log Out From Graphical Mode User

useradd                                                           To Add User

whoami                                                           Login Name Of User

clear                                                                 Clean Terminal

reset                                                                 Clear Buffer

history                                                             History Of Inserted Commands

history –c                                                        To Clear History Of Inserted Commands

poweroff                                                         To Shut Down Machine

ctrl +                                                                To Increase Window Size

ctrl –                                                                 To Decrease Window Size

mkdir –p                                                          To Make Tree Directories ex. abc/def

touch f1                                                           Make An Empty File

cat >File Name                                               View File With Inserted Name

cp Path Of Source Path Of Destination                       To Copy File

mv Original File Name New File Name         To Rename File

cp –a Source Destination                                To Copy Directory

rm File Name Or File Path                             Remove File

rm –rf Directory Name                                   To Remove Directory Force Fully

rm Directory Name                                         To Remove Directory

head File Path Or Name                                 To View Top 10 Lines

tail File Path Or Name                                    To View Last 10 Lines

head –n 2 nnn                                                  To View First 2 Lines Of nnn

tail –n 2 nnn                                                    To View Last 2 Lines Of nnn

chvt 1 To 7                                                      Change Terminal To 1 To 6 For Text Mode OR 7 For GUI

startx                                                               Transform Text Mode To GUI Mode

su -Username                                                  To Switch User

passwd Username                                           To Diversify User Password

ctrl Shift t                                                        New Tab In Terminal

<tab> After Incomplete Command                To Complete Command Argument

Bash                                                                To Store History Of Commands Which Are Executed

ctrl –r                                                               To Search For A Command From History