Friday, October 7, 2011

Basic commands for Linux


#cat   >filename - create a file
#cat   >filename - see the file contains
#cat   >>filename - Add the extra mater in file without editing
#Ctrl+d - save the file contents
#rm   filename - delete the file
#mkdir   directory name - create a new directory
#cd   directory name - open the directory
#cp   old file   new file - copy file
#mv old file new file - move the file
#cat   >.filename - create a hidden files
#ls   -1 - see the all file and folder
#rmdir   directory name - delete the empty directory
#rm   –rf   filename - delete the directory and it contents
#clear - clear the screen
#cd .. - close the directory stapes by stapes
#cd \ - close the many directory directly
#vi   filename - edit the file
#cleanlinks - remove all empty directories
#pwd - present working directory
#exit - log off the current user
#Ctrl+d - log off the current user
#who   –u - how many open consoles
#kill (process id) - kill the open consoles
#touch   filename - update the file access and modifies time. Associate with a file
#tty - see the terminal type
#head   filename - see the head of file
#tail   filename - see tail of file
#men   command name - see the help
#eject   - eject the CD ROM drive
#eject   –t - close the CD ROM drive
#cal - see the calendar
#find 1 –name filename - see the file location 
#du   filename - see the file contents
#df - see the free space of the hard disk
#ls   –l | more - see the file and directory page wise
#wc   –l   file - see the line of that file
#wc   –w   file - see the word of that file
#wc   –c   file - see the character of that file
#fsck - to check the file system
#mv   –t   file1   file2 - this command is used to over writing without prompting
#mv   –i 1filename 2filename - this command will prompt you for confirmation
#startx - transfer the graphic from text
#mount - see the mounted contents
#compress   –v   filename - compress the file (35%)
#uncompress   filename z - uncompress the compressed files
#gzip   –v   filename - compress the file 65%
#ungzip   filename gz - uncompress the file
#fdisk   –l - see the partition table
#ifconfig - see the IP address this computer on the network
#netconfig - assign the IP address
#ifdown   eth0 - down the network adapter
#ifup   eth0 - active the network adapter
#Ifconfig   etho   ip   address - assign the IP address in common line
#iptables –l - to see the fire wall content down/start
#echo $ - to see the command start or not start
#lokkit - to open security level
#setup - open the configuration tools
#ntsysv - open the configuration service
#sysctl –a - to see the kernel Para meter
#ethtool - to see the used modify the Ethernet tool
#mii   –tool - to see and used modify the network adapter
#pstree - to see the all process
#lsattr - display file attribute
#switchdisk   kde - transfer the GNOME to KDE
#switchdisk   gnu - transfer the KDE to GNOME
#ps   x - to show the process ID
#hwbrowser   - to see the system configuration
#mkfs - this command is used to format the partition
#init   0 - shutdown the pc
#init   6 - restart the pc
#telinit   0 - shutdown the system
#telinit   6 - restart the system
#shutdown   –n   now - reboots the system
#halt - shutdown after halting
#poweroff - shutdown the system
#shutdown   –r   now - reboot the system
#reboot - to restart the system
#su root - login root without log out any user
#service - to start and restart or stop the service     
>i.e. - service network restart
#Hostname   computer name - to modify the computer name
#domainname   net.com - to modify the domain name
#chmod - this command is used to assign the permission
#chown - to change the owner ship
#chgrp - to change the group owner ship
#mkdir   –p   directory name - to create the directory forcefully.

No comments:

Post a Comment