February 25, 2024, 06:37:27 PM

News : LinuxSolved.com Linux Help Community Forum..

Author Topic: 40 Basic Linux Shell Commands  (Read 11522 times)

Offline prashish

  • New Member
  • Posts: 2
40 Basic Linux Shell Commands
« on: August 22, 2010, 09:55:23 AM »
Linux has more than 650 commands and every command has its own set of options all performing different operations. Going through each and every one of these commands will be a very tedious task. However limiting yourself to only a few of them is never an option. The trick here to learning all these commands, is to categorise them according to their function. By doing this, you will know atleast the basic commands and have some measure of control over the Linux command line.

When you go through these commands, you will be able to perform different function as per your need in the Linux command line.

Basic Commands
User Account
Network Commands
Archive Commands
Help Commands
Package Management Utilities
Process Commands

The ‘must’ know commands fall in this category. I have distributed the commands into two sub categories:  Directory commands and File commands.

pwd   :   Print working directory
mkdir :  Create directories
cd    :   Change the current directory
rmdir   :   Remove directories
ls   :   List directory contents
rm   :   Remove files
cp   :   Copy files from a source to the same or different target(s).
mv   :   Move file to different targets.
cat :   Read one or more files and print them to standard output. If you need to
view  contents of a short file, cat is recommended.

cmp: Compare two files byte by byte.
wc:   Print the number of new lines, words, and bytes in files.
du   :   Estimate disk usage of each file and recursively for directories.
find:   Search for files in directory hierarchy, e.g. find notes.txt
grep:   Print lines matching a pattern,e.g. grep –i topic notes.txt (topic is the pattern)
sort:   Sort lines of text files
« Last Edit: April 29, 2011, 05:34:31 AM by LS-Admin »

Offline dalek

  • LST CareTaker
  • Crescent
  • *****
  • Posts: 243
Re: 40 Basic Linux Shell Commands
« Reply #1 on: December 31, 2011, 10:09:52 AM »
I would add the command df too. 

df - report file system disk space usage

I personally like df -h myself. 

I realize the thread is old but it is still a good one.  I may think of another command later on. 

 :)  :)