Some Basic 8 Linux commands


Linux command :-


1 :- whatis  command_name

इस कमांड से हम दूसरे कमांडो की sort definition को जान सकते है |
a :- whatis cat
cat एक linux कमांड है यह पे हम cat की sort definition को जानेंगे |

b :- whatis passwd
passwd भी एक linux कमांड है |

c :- whatis sort
sort भी एक linux कमांड है |

किसी भी कमांड की sort definition जानने के लिए आप whatis कमांड का उपयोग कर सकते है इसके लिए आपको अपने terminal पे whatis command_name टाइप करना होगा | command_name की जगह command का नाम लिखना होगा

2:- whereis command_name

इस कमांड से हम ये जान सकते  है की  जो दूसरी कमांड है वो कहाँ – कहाँ use हो रही है |

a:- whereis cat

b:- whereis passwd

c:- whereis time

3:- which command_name

इस कमांड से हम यह जान सकते है की जो दूसरी कमांड है उसकी location कहाँ है |

a:- which cat

b:- which dir

How to create , open & delete text file 

अब हम जानेगे की कैसे text फाइल को कमांड की सहायता से create , open और delete करते है |

 Create and Open text file  

फाइल को create और open करने के लिए cat command का प्रयोग किया जाता है |

4:- Cat Command 

Create file  :- 

command :-     cat > file_name.txt  

for example :- cat > example.txt
कमांड लिख़ने के बाद एंटर करे |  एंटर करने के बाद आप text लिख सकते है

———————————————-

———-write some text——————-

———————————————-

press :- ctrl+D

text लिख़ने के बाद ctrl के साथ D बटन को प्रेस करे |
अब home पे जा के आप देख सकते है की आपकी text file create हो गयी है |

Open file :- 

command :-     cat file_name.txt 

for example :- cat example.txt
कमांड लिख़ने के बाद एंटर करे |

Delete text file 

किसी text फाइल और folder  को delete करने के लिए rm कमांड का प्रयोग करते है |

5:- rm command 

for text file :-

command :-    rm file_name.txt     

for example :- rm example.txt

कमांड लिख़ने के बाद एंटर करे |

for folder :-

command :-    rm -r -f floder_name/     

for example :- rm -r -f video/

एंटर करते ही floder डिलीट हो जाएगी|

6:- sudo su command 

sudo su लिनक्स की एक मह्त्वपूर्ण कमांड है | sudo का मतलब होता है SuperUserDO

इसका प्रयोग root user  के लिए किया जाता है |

command :- sudo su 

कमांड लिख़ने के बाद एंटर करे |

7:- poweroff  command 

ये कमांड terminal को सीधे close (poweroff ) करता है |
poweroff कमांड को लिख़ने से पहले sudo लिखना न भूले | क्योकि इस कमांड को execute करने के लिए हमे root permission चाहिए होती है |

command :- sudo poweroff

कमांड लिख़ने के बाद एंटर करे |

8:- mkdir command

folder को create करने के लिए mkdir command का प्रयोग किया जाता है |

command :- mkdir folder_name 

 

One Reply to “Some Basic 8 Linux commands”

Leave a Reply

Your email address will not be published. Required fields are marked *