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

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.

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 directorymkdir : Create directoriescd : Change the current directoryrmdir : Remove directoriesls : List directory contentsrm : Remove filescp : 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 toview 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.txtgrep: Print lines matching a pattern,e.g. grep –i topic notes.txt (topic is the pattern)sort: Sort lines of text files [..........]