Top 10 commands important for LINUX Newbies

TOP 10 Commands for LINUX Newbies 

1 . ls - list directory contents . By normally using 'ls' we will not able to see the dot files .

Inorder to see the dot files , we can use ls -a  - list almost all contents of the directory .

2 . cd - Change directory . use to change from one directory to other .

    cd .. -  change directory to previous one .

   cd directory_name  - changes to the respective directory .

3 . touch - used to create the files . touch filename . 

4. vi filename , gedit filename : where vi and gedit are the text editors to write the content to the file .

5 . echo : Echo is been used as a print statement , also to write data into the file .

echo "content of the file "  > filename - write the content inbetween the "" into the file . > - represents , replacing the content of the file with the given string 

echo "content of the file" >> filename - append the content at the end of the file (>>)

6. mkdir directoryname - used to create a directory .

7. alias : alias is been used to create a shortcut for a command .

    alias cl="clear"  . Now we can use cl to clear the window .

8. top : used to see the background running process . each process has a unique PID (process ID ) . we can also kill the process kill PID .

9: mv : used to rename a file . also used to move a file from one location to another .

 i.    mv old_filename new_filename
 ii.   mv filename Destination location 


10 . rm , rm -rf : rm is been used to delete a file . rmdir used to delete the directory . rm -rf  is been used for both .


 Be cautious while using " rm -rf " because rm -rf /  will delete all of your data , and it cant be brought back . 


Inorder to see the working flow of the above commands , visit my youtube channel .  Here is link for video

 




 


 

Comments

Popular posts from this blog

What is the best way to learn Programming ?