LINUX COMMANDS:-
[root@localhost~]
#ls: List of contents
#ls-l: List of
contents with attributes
#ls-l! More:
Page wise
#mkdir: Make directory
#cd “dirname”:
change directory
#cd...: Move
back to the previous directory
#cal: Calender
of month
#cal2004:
Calender for the year 2004
#be: Calculator
#date: For the
current date
#init 0: shut
down
#init 6: restart
# Reboot: restart
# Exit: logout
# Clear:
clearscreen
# Halt: shut
down
# Pwd: present
working directory
# Touch (filename):
make an empty file
# Cat (filename):
show the contents of file
# VI (filename):
to edit the file
# Cp: to copy
the contents from one DIR to another
# Rm: to delete
files and directories
# Gzip: used to
compress files
# gzip-d: used
to decompress
# Rm [file name]: to delete a file
# Rm –RF [file/dir.name]: to delete a
file or directory with data in it.
THERE
ARE SOME IMPORATANT COMMANDS TO OPERATE LINUX NOW
HOW
TO USE COMMANDS IN THERE STEP WISE. STEP_1
[root@localhst~]# Root
# Balakinc________password
to login in the root.
#tty______________to
check the terminal that is used.
#whoami
_________to check the user account in which login.
#mkdir {name}
_____to make directory.
#cd {name} ________to
open directory.
#clear / [ctrl+l] _____to clear screen.
#pwd_____________to
check the current directory {print working directory}.
#cd..._____________to
close only one directory in which working #cd_______________to close all
directories & go to root.
#LS________________to
checks the list of directories.
#ls-l________________to
check attributes wise.
#ls-l! more___________to
check page wise.
#LL________________to
check directories long list wise. #dir________________also to check
the directories but no any diff between files n directories. in colors
#rm –rf
[name]_______to delete something.
#Directories are of blue color.
#Files are of white
color.
STEP_2
#cd
[name] ___________to enter in the directory.
#touch
[name]_________to make a file.
#echo “text
something” > [filename]___ to write in file with
deleting
__the
previous text.
# echo “text
something” >>[filename]__ to write without delete
the
___
previous text . or add
#cat
[filename] _________ to check the contents of the file.
STEP_3
#cat >
[filename]______ to enter in a file n add a paragraph
with
_____
the previous content .
#cat
>> [filename]_____ to enter in a file to add paragraph without de _____ delete
the old data.
#ctrl+d
_______________to save & exit from the file.
#
ctrl+c_______________withoput save& exit
from the file.
Remember:___[ >] ____ old data will be deleting.
:__[ >>] ____Old data will not
delete.
STEP_4
How
TO Work In The Editors:_______________________Its Important.
Three
Editors:___[vi] Editor.
:___[vim] Editor.
:___[nano] Editor.
# vi
[filename] ________to enter in an editor.
#editor have
two modes[insert mode] & [escape mode] can not write
In an editor
in escape mode therefore we have to go to insert mode.
# press[
insert button] / [i] _____ to go to insert mode.
# press[
escape] ______________to return to escape mode
_____________Because we can only save & exit on escape mode.
#
:wq_________ to save & exit.
# :q
___________without save & exit from editor.
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________
COMMANDS FOR USERS AND
GROUPS :-___________________________
#
useradd name :______ to add a user
#
passwd name :_______ password for new user .
______________________password
is the must for the any user or group b
coz without
Password
no any one is login the linux.
Password
is must________________________________________________
#
groupadd : __________to create a new group
#
gpasswd name :______ password for new group
USER
DELETE_______________________________________________
# userdel pop __________ to delete user.
____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
SHUT DOWN /RESTART/_______________ RETURN TO GUI
MODE__________________
# init 0 :___________to shutdown the
pc.
# halt :___________to shutdown pc.
# shutdown –h now _to shutdown.
# init 6 :___________restart pc.
# reboot :__________restart pc.
# init 5 :___________return to GUI mode.
sometimes pc does not return to the gui mode
Use this command to return to the gui mode.
HOW TO GIVE IP IN
LINUX____________________________________________
# setup __________to enter In the
setup for give ip.
1__select
[network configuration ] option.
2__ok.
Then a window appers.___
if the [*] is on the dhcp then it automatically dicover ip
from dhcp server.
MANUALLY IP__to manually give ip to pc
remove [*] from the dhcp using SPACE
Then
enter the IP + SUBNET and then
OK>QUIT>QUIT.
Then to change the ip u must
run the
# service network restart _____ to
restart the network services after this command the
______ip
will be
change.
Must run
this coammnd after change the ip
To check the ip
address__________________________________________
# ifconfig____________to check ip .
# ip addr ______________to check ip.
Network
service____________________________________________________________
every
time we start the pc it checks for the network & check for the ip
change or change in the other network services changes. it takes lots of time
to permanently on / off the network
services.___________
# chkconfig network on .________ to
permanently on the service.
# chkconfig network off _________to
permanently off the service.
KERNAL version___________________________________________________________
# uname –r _______ t o check the
kernal version .
OS_______________________________________________________________________
# uname ______________ to check the
o/s version.
HDD_______________________________________________________________________
# fdisk –l _________to check all detail of the hard disk.
# df –th___________to check which
partition is In use.
DELETE_____________________________________________________
#rm [file name] ______used to delete
only files.
#rm dir [directory name] __to
delete empty directory.
#rm –rf [director name] ___ to dekete
directories having data.
CALANDER___________________________________________________________
#cal ___________ to see calander.
# cal 8 2008 _____ to see month wise.
# cal 2008 _______year wise.
CALCULATOR___________________________________________________________
# bc ________ to enter ini a
calculator.
# exit________to exit the bc.
COPY
DATA______________________________________________________________
SUPPOSE WE HAVE TWO FILES IN A ROOT
[AA] / [BB]
To copy the data of a file into other
# cat aa > bb __ to copy from aa to
bb with deleting of previous data in bb.
# cat aa >> bb ___ to copy
without deleting data of bb or add in bb.
FROM
DIRECTORY_______________________________________________
two dir.. [aaa]/ [bbb]
# cp /root/aaa/* /root/bbb ____ to
copy only files from aaa to bbb.
# cp –var /root/aaa/* /root/bbb
___ t o copy all the data.
# cp –var /root/aaa/a* /root/bbb___ to
copy files starting from [a].
MOVE / CUT
PASTE________________________________________________
# mv –var /root/aaa/* /root/bbb _ to
cut / paste or move all data from aaa to bbb.
PASSWORD CHANGE
_______________________________________________________
# passwd____ to change root password.
New --------------
Retype-----------------.
Successfully
done.
# passwd pop _________ to change
user password.
New--------------------
Retype-----------------------
Successfully
done.
SWAP
POSITION_______________________________________________________
# swapon –s _______ to check swap
detail.
MOUNT POINT
REFRESH______________________________________________
# mount –a __________ to refresh mounting point.
CHANGE BOOT LOGIN NAME_&
MASSAGE OF THE DAY motd._______________
# vi /etc/issue_________boot login
name change __ open it and edit the file.
# vi /etc/motd _______change massage
of the day __ open and edit the file .
CHANGE LANGUAGE OF
SYSTEM_______________________________________
# system-config-language __ to change language.
MAKE A HIDDEN FILE
__________________________________________________
#touch .[filename] _____ use a [.] dot
before the file name to make a hidden file.
Dot
HOW TO OPEN A FILE LIKE THIS
__NAME ______________________________________
USHER CONFESSION
# cd U{ then press [tab]} to open the
file as
# cd USHER-\ CONFESSION ______________
and the file is open .
COMMANDS OF LINUX IMPORTANT
# vim -r {anyfilename} ___ to recover file if any
changes made to file run this command in
the directory of the file.
# system-config-display
____to set the display of the monitor to change resolution.
# vi /etc/services __________ to check all the
port numbers and all services of Linux.
#w ____________________ to
show the all information of the user on which u login
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.