Tuesday, 6 May 2025

Top 10 Useful Linux Commands

 

 

 

Here are going to discuss Top 10 Important useful LINUX Commands.

 

ls command

ls command is used for lists the files and directories under folder.

 

pwd command

pwd command is useful for checking the present working directory.

 

cd command

cd command is useful for changing the directory or going to specific directory.

Examples :- cd /home/oracle

                   cd /home

                   cd .. ( For going one directory upwardfrom current directory)

 

cp command

cp command is useful for copying one file to another file in same or different location.

Example :- cp file1 file2 (for copying file1 into file2 and file1 is also available there after copy)

                  cp file1 /target/file2 (for copying file1 content into /target location with name file2 )

 

mv command

mv command is useful for move a file or folder to another location.

Example :- mv /source_location/file1 /target_location/        (For moving file1 to /target_location)

                 mv /source_location/file1 /target_location/file2 ( For renaming file to file2 on target location )

 

rm command

 rm command is used for deleting files from directory.

Example: rm /source_location/file1 ( for removing file1 from /source_location)

               rm file1 file2                  ( for removing file1 and file2 from current working directory)

               rm *                               ( for removing all files from current location)

 

 NOTE:- Always be double sure about using rm command

mkdir command

mkdir command is used for creating directory

Example : mkdir /source_location        (For creating /source_location directory under / (root))

               mkdir /source_location/location2     ( for creating location2 folder inside /source_location/ )

 

rmdir command

rmdir command is used for removing directories if they are empty.

Example :- rmdir /source_location/*

 

df command

df command for getting information about file system and its space

Example :- (df –h for displaying information regarding file system and its space usage)

 

help command

help command is useful for getting help for commands.

mkdir --help

 ls --help

 

 

 

 

 

 

 

 

 

No comments:

Post a Comment