Learn Linux


Basic Commands

|Sl. No.|Command|Abbrev.|About| |-|-|-|-| |1.|cd|Change Directory|For navigation between different Folders | |2.|cat|Concatenation|Concatenate files and print on the standard output | |3.|pwd|Present Working Directory|Displays the directory path where the user is currently positioned | |4.|ls|Listing files|Lists the files present in a directory. Can be used with attributes for special listing | |5.|mkdir|Make Directory|The command followed by a name makes a directory of the given name | |6.|rmdir|Remove Directory|Removes an empty directory | |7.|rm|Remove|Removes files and directories | |8.|touch|Create file|Used to create a file | |9.|man|Documentation|Gives detail explanation of any linux command given as attribute to it | |10.|cp|Copy|Copies a file or directory from one location to another | |11.|mv|Move or Rename|Moves or Renames a given file or directory | |12.|find|Find a file|Locates a file or directory in any location based on some selection criteria| |13.|echo|Displays or moves a text|Displays or moves the line of text given as attribute on the terminal or a given file | |14.|sudo|SuperUser Do|Runs any command with administrative or root privileges | |15.|df|Disk Space|Displays the disk space used and remaining for all the partitions | |16.|chmod|Change mode|Changes the permission for certain files or directories | |17.|clear|Clear screen|Clears the terminal | |18.|grep|Pattern Matching|Used to find some pattern in a file or a database | |19.|git|Version control|Used to perform different operations in Github| |20.|date|Current date|Displays the present date in the format day:mon:date:time:zone:year| |21.|exit|Exit terminal|Exits the terminal that is currently opened| |22.|gcc -o test [program_name]|GNU-GCC compiler|Compiles C program| |23.|./ test|program testing|runs the program in terminal| |24.|clear|clear the terminal| Equivalent to typing Control-L when using the bash shell.| |25.|nohup|no hangup|prefixing a command with nohup prevents it from being aborted automatically when you log out or exit the shell.| |26.|cut|cut out|extract sections from each line of input — usually from a file| |27.|paste|writes selected section|writes selected sections from a file, separated by delimiter, to the output file| |28.|locate|faster file search|searches database prepared by updatedb to locate a file(similar to find)| |29.|at|runs commands at specified time| schedule one or more programs for a single execution at some later time| |30.|ln|link|creates links(soft or hard) between files| |31.|g++ -o test [program_name]|GNU compiler|Compiles C++ program| |32.|passwd|password change|Change the password of the linux user account with root user|