Linux Shell Command||Linux Shell Command क्या होती है?

Linux Shell Command||Linux Shell Command क्या होती है?

🔹 1. Introduction (Linux Shell Command क्या होती है?)

  • Shell एक प्रोग्राम होता है जो यूज़र से कमांड लेकर कंप्यूटर को काम करवाता है।
  • Shell Commands वो निर्देश (Instructions) होती हैं जो हम कंप्यूटर को देते हैं काम करने के लिए।

Example:

  • जैसे हम बोलते हैं “पानी लाओ” — तो सामने वाला समझ कर काम करता है।
  • वैसे ही, हम कंप्यूटर से कहते हैं: mkdir myfolder इसका मतलब: “एक नया folder बनाओ जिसका नाम हो myfolder“।

🔹 2. Common Linux Shell Commands (with Syntax and Example)

CommandUse (क्या करता है)SyntaxExample
pwdCurrent directory दिखाता हैpwd/home/user
lsFiles और folders की list दिखाता हैlsls /home
cdDirectory बदलनाcd foldernamecd Documents
mkdirनया folder (directory) बनानाmkdir foldernamemkdir notes
rmफाइल या फोल्डर हटानाrm filenamerm file.txt
rmdirखाली फोल्डर हटानाrmdir foldernamermdir notes
touchनई खाली file बनानाtouch filenametouch hello.txt
catFile का content दिखानाcat filenamecat hello.txt
cpCopy करनाcp source targetcp a.txt b.txt
mvFile को move या rename करनाmv old newmv a.txt b.txt
clearTerminal साफ करनाclearclear
exitTerminal बंद करनाexitexit

🔹 3. Notes and Tips (महत्वपूर्ण बातें)

  • Linux commands case sensitive होती हैं → cd और CD अलग-अलग माने जाते हैं।
  • Spelling एकदम सही होनी चाहिए।
  • Command लिखने के बाद Enter दबाना जरूरी है, तभी command चलेगी।

🔹 4. Exam में कैसे लिखें? (How to write in exam)

Question: Write any five Linux Shell Commands with syntax and example.
Answer:

  1. pwd – Shows current directory
    👉 Syntax: pwd
    👉 Example: /home/student
  2. mkdir – Makes a new folder
    👉 Syntax: mkdir foldername
    👉 Example: mkdir project
  3. cd – Changes the directory
    👉 Syntax: cd foldername
    👉 Example: cd Documents
  4. rm – Deletes a file
    👉 Syntax: rm filename
    👉 Example: rm data.txt
  5. cat – Shows file content
    👉 Syntax: cat filename
    👉 Example: cat notes.txt

📝 Linux Commands with Syntax and Example (Exam Format)


1. who – यह कमांड system में login किए हुए users को दिखाता है।

Syntax: who
Example:

who  

2. whoami – यह दिखाता है कि आप किस user से logged in हैं।

Syntax: whoami
Example:

whoami  

3. mkdir – यह नया folder (directory) बनाता है।

Syntax: mkdir foldername
Example:

mkdir myfolder  

4. cd – यह directory बदलने के लिए use होता है।

Syntax: cd foldername
Example:

tcd Documents  

5. ls – यह files और folders की list दिखाता है।

Syntax: ls
Example:

ls  

6. rmdir – यह खाली folder को हटाने के लिए use होता है।

Syntax: rmdir foldername
Example:

rmdir oldfolder  

7. pwd – यह current directory का path दिखाता है।

Syntax: pwd
Example:

pwd  

8. cp – यह file या folder को copy करता है।

Syntax: cp source destination
Example:

cp a.txt b.txt  

9. clear – यह terminal को साफ करता है।

Syntax: clear
Example:

clear  

10. echo – यह कोई text या variable output करता है।

Syntax: echo text
Example:

echo Hello World  

11. date – यह system की current date और time दिखाता है।

Syntax: date
Example:

date  

12. cal – यह calendar दिखाता है।

Syntax: cal
Example:

cal 2025  

13. grep – यह किसी file में दिए गए शब्द को खोजता है।

Syntax: grep word filename
Example:

grep "hello" myfile.txt  

14. chmod – यह file की permission बदलने के लिए use होता है।

Syntax: chmod mode filename
Example:

chmod 777 a.txt  

15. cat – यह file का content दिखाता है।

Syntax: cat filename
Example:

cat file1.txt  

16. find – यह command files को search करने के लिए use होती है।

Syntax: find path -name filename
Example:

find / -name file.txt  

17. sort – यह किसी file के content को alphabetically sort करता है।

Syntax: sort filename
Example:

sort names.txt  

18. cmp – यह दो files को compare करता है।

Syntax: cmp file1 file2
Example:

cmp a.txt b.txt  

19. zip – यह files को compress करने के लिए use होता है।

Syntax: zip zipfile file(s)
Example:

zip mydata a.txt b.txt  

20. tar – यह कई files को एक compressed archive में convert करता है।

Syntax: tar -cvf name.tar files
Example:

tar -cvf backup.tar a.txt b.txt  

21. ps – यह system के current running processes को दिखाता है।

Syntax: ps
Example:

ps  

22. top – यह system की real-time performance और processes को दिखाता है।

Syntax: top
Example:

top  

23. kill – यह किसी process को बंद करने के लिए use होता है।

Syntax: kill PID
Example:

kill 1234  

24. netstat – यह network connections की जानकारी देता है।

Syntax: netstat
Example:

tnetstat  

25. df – यह disk space की जानकारी देता है।

Syntax: df
Example:

df -h  

26. logout – यह current user को system से logout करता है।

Syntax: logout
Example:

logout  

📝 Linux Shell Commands (In Simple English – Exam Format)


1. who – Shows the list of users who are currently logged in.

Syntax: $ who
Example:$who


2. whoami – Shows the username of the currently logged-in user.

Syntax: $whoami
Example:$whoami


3. mkdir – Used to create a new folder (directory).

Syntax: $mkdir folder_name
Example: $mkdir myfolder


4. cd – Used to change the current directory.

Syntax: $cd folder_name
Example : $cd Documents


5. ls – Lists all files and folders in the current directory.

Syntax: $ls
Example:$ls


6. rmdir – Deletes an empty folder (directory).

Syntax: $rmdir folder_name
Example:$rmdir oldfolder


7. pwd – Shows the full path of the current working directory.

Syntax:$ pwd
Example:$pwd


8. cp – Used to copy files or folders.

Syntax: $cp source destination
Example:$cp a.txt b.txt


9. clear – Clears the terminal screen.

Syntax: $clear
Example:$clear


10. echo – Displays a line of text or value of a variable.

Syntax: $echo text
Example:$echo Hello World


11. date – Displays the current system date and time.

Syntax: $date
Example:$date


12. cal – Shows the calendar of a month or year.

Syntax: $cal
Example:$cal 2025


13. grep – Searches for a specific word or pattern in a file.

Syntax: $grep word filename
Example:$grep "hello" file.txt


14. chmod – Changes the permission of a file or folder.

Syntax:$ chmod mode filename
Example:$chmod 777 a.txt


15. cat – Displays the contents of a file.

Syntax: $cat filename
Example:$cat file1.txt


16. find – Searches for files or directories in a path.

Syntax: $find path -name filename
Example:$find / -name file.txt


17. sort – Sorts the contents of a file alphabetically.

Syntax: $sort filename
Example$sort names.txt


18. cmp – Compares two files and shows the differences.

Syntax: $cmp file1 file2
Example:$cmp a.txt b.txt


19. zip – Compresses one or more files into a zip file.

Syntax: $zip zipname files
Example:$zip mydata a.txt b.txt


20. tar – Archives multiple files into one file.

Syntax: $tar -cvf name.tar files
Example:$tar -cvf backup.tar a.txt b.txt


21. ps – Shows currently running processes.

Syntax:$ ps
Example:$ps


22. top – Displays real-time system performance and processes.

Syntax:$ top
Example:$top


23. kill – Used to stop (kill) a running process.

Syntax: $kill PID
Example:$kill 1234


24. netstat – Displays network connection details.

Syntax: $netstat
Example:$netstat


25. df – Shows the available and used disk space.

Syntax: $df
Example:$df -h


26. logout – Logs out the current user from the terminal.

Syntax: $logout
Example:

logout

How to Write in Exams:

  • Choose 5 to 10 commands.
  • For each, write: Definition + Syntax + Example.
  • Keep the format clean and aligned — just like shown above.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

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