Basic Linux Commands

Below are some basic Linux commands which very important to use Linux operating system. It makes our life easier. ls: Command lists files and directories in the a directory.


Example: ls
cd: We use cd command to change current directory & navigate to other directory.

Example: cd /path/to/directory
pwd: Command tell us complete path of the current working directory.

Example: pwd
mkdir: Command use to creates a new directory.

Example: mkdir new_directory
rmdir: Command use to removes/deletes an empty directory.

Example: rmdir directory_to_remove
rm: Command use to removes/deletes files or directories.

Example: rm file_to_remove or rm -r directory_to_remove 
(to remove a directory and its contents recursively)
cp: Commmand use to copy files or directories.

Example: 
cp source_file destination_file or cp -r source_directory destination_directory 
(to copy a directory and its contents recursively)
mv: Command use to moves (renames) files or directories.

Example: mv old_name new_name or mv source_file destination_directory