Thanks for Visiting my channel
by Hari Shyam/ sep 03, 2017
अगर आप windows से Linux operating system पर switch करने की सोच रहे है या फिर आप linux operating system को सीखना चाह रहे है तो यहाँ पर हम आपको most popular and basic common linux commands की list दे रहे है जो की आपको आने चाहिए | अगर आपने linux पर पहले भी काम किया हुआ है तो आपको इस list को देख कर अपने पहले पढ़े हुए linux commands को revise कर सकते है | यहाँ पर हम केवल linux commands की list दे रहे है इनके syntax या फिर इनके बारे मे ज्यादा discuss नहीं करेंगे लेकिन अपने next कुछ post मे इन commands को explain करेंगे जिससे आप en commands को अच्छी तरह से सिख कर practice कर सके |
ls : List the current directory content.
cd : Use this to change current Directory.
cat : can be used to display file content on to the screen, copy and combine text files.
history : use this to show all executed commands list on the screen.
chmod : use chomod to change file permission.
chown : use this to change file owner.
clear : use this to clear screen for fresh start.
df : It display used and available disk space.
date : display current system date and time
du : It display space taken by each file.
file : it recognize type of data in any file.
find: search any term in file.
man : display help for specific command.
cp : can be used to copy files and folders
mv : it can be used to rename or move files and dir.
mkdir : can be used to create new directory.
lpr : use to print any file content.
less : can be used to see file content page by page.
tar : To compress – can be used to create and extract tar file.
grep : can be used to searh a string (with pattern also) in a file.
ssh : can be used to connect and login remote machine (encrypted & secure)
su : can be used to switch to different user
rmdir : can be used to remove empty directory
rm : can be used to remove files and directories (emptry or non empty)
pwd : it shows current user working directory
ps : it display running process with id and other information
passwd : can be used to change user password
more : it display file page by page
kill : can be used to kill any process with the help of process id
gzip : to create a compress file with .gz extension
unzip : to unzip or uncompress zip file
shutdown : to shutdown machine
free : can be used to dhow
top : to show top process on the based of cpu usage
who : to display users information who are currently logged in
whereis : to find out the location of any command (where it is stored)
whatis : show any command information in a single line.
tail : print last ten lines of any file
wget : to download any file from internet, rename it and store anywhere
Linux Commands:–
.bc Command:- .bc Command का उपयोग टर्मिनल पर कैलकुलेटर की सुविधा को प्राप्त करने में किया जाता है | इसके लिए प्रोम्प्ट पर .bc Command type कर enter key press कीजिये | जिससे कैलकुलेटर की सुविधा सक्रिय हो जाएगी | अब हम कोई भी गणना कर सकते है इसे बंद कर वापस प्रोम्प्ट पर जाने के लिए Ctrl+D दबाये |
$bc
22+32
54
Cal command: – इस कमांड का उपयोग वर्तमान माह का कैलेण्डर की सुविधा प्राप्त करने के लिए किया जाता है|
&Cal
इसका आउटपुट निम्न प्रकार से प्राप्त होगा
April 2016
Su Mo Tu We Th Fr Sa
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Cal command के साथ निम्न विकल्प भी दिए जाते है |
Cal-3:-यह विकल्प वर्तमान माह तथा पिछले माह तथा अगले माह का कैलेण्डर एक साथ प्रदर्शित करता है |
Cal-4:-यह विकल्प पूरे वर्ष का कैलेण्डर प्रदर्शित करता है
Cat command: – इस कमांड का उपयोग प्रोम्प्ट कर नयी फाइल बनाने के लिए किया जाता है यह कमांड डॉस के copycon कमांड के समान ही होती है
कमांड सरचना :-
$Cat><file name>
…… ………….
…… ………….
˄D
उपर्युक्त संरचना से स्पष्ट है की cat कमांड के साथ ‘>’चिन्ह का उपयोग कर फाइल का नाम देगे दिए गये नाम से एक नयी फाइल बन जाएगी|फाइल में मेटर टाइप करते समय प्रत्येक लाइन समाप्त होने पर इंटर दबायेगे तथा फाइल को बंद करने के लिए Ctrl+D का उपयोग करेगे |
Cp command:- इस कमांड का उपयोग फाइल को कॉपी करने के लिए किया जाता है |
कमांड सरचना :-
$Cp><Source Filename><Target Filename>
Ex- $Cp Maruti Maruti1
Cd command- Cd शब्द का अर्थ है “change directory” अर्थात हम उस कमांड का उपयोग किसी डायरेक्ट्री तथा उसकी सब डायरेक्टरी में जाने के लिए करते है यह डॉस के cd कमांड के समान है जहा cd के साथ किसी डायरेक्टरी का नाम देने पर दी गई डायरेक्ट्री सक्रिय हो जाती है
कमांड सरचना :-
$Cd><Diroctoryname>
Ex- $Cd Practical
Chgrp command: – यह कमांड समूह स्वामित्व को बदलने के लिए किया जाता है
कमांड सरचना :-
$Chrgp[Option]……..<Groupname><Filename>
Command के साथ निम्न option प्रयोग किये जाते है
V: प्रत्येक फाइल जिस पर प्रक्रिया की जा चुकी है | उसका निदानसूचक (output) प्रदर्शित होता है
Help: कमांड से सम्बंधित हेल्प प्रदर्शित करता है |
Version: संस्करण को प्रदर्शित करता है |
Chmod command: – यह कमांड फाइल के एक्सेस अधिकार (Access Permission) बदलने के लिए उपयोग किया
जाता है | अगर हम Is-1 Command के द्धारा Files की विस्तृत सूची देखे या Is-1 के साथ किसी फाइल का नाम देकर उस फाइल का विस्तृत विवरण देखे तो निम्नानुसार दिखाई देता है |
Ex: – $1s-1 Maruti
Rwx rwx rwx 1 root root 35 June 15 18:52 Maruti
उपर्युक्त आउटपुट फाइल के विषय में निम्न विवरण दे रहा है
एक्सेस अधिकार (Access) स्वामी (Owner) का नाम ,फाइल का आकार(Size), दिनांक एवं समय (Date and Time),एवं का फाइल का नाम जैसा की स्पष्ट है की उपर्युक्त विवरण में पहली जानकारी एक्सेस अधिकारों को प्रदर्शित कर रही है | यहाँ लिए गए उदाहरण में हमें विवरण के एक्सेस अधिकार वाले खंड rwx rwx rwx लिखा दिखाई दे रहा उपर्युक्त जहा r,w, and x का अर्थ है
r – read
w – write
x – execute
Chown Command: – यह कमांड किसी भी फाइल का स्वामित्व परिवर्तित करने के लिए उपयोग किया जाता है जिस यूजर ने जिस फाइल को बनाया है वह उसका स्वामी (owner) होता है | अगर फाइल का स्वामी स्वयं चाहे तो खुद या सिस्टम एडमिनिस्ट्रेटर root के माध्यम से file का स्वामित्व किसी अन्य यूजर को दे सकता है इस कमांड एक और विशेषता है की इसके द्धारा हम फाइल का समूह भी बदल सकते है अर्थात यह कमांड chgrp का भी कार्य करती है |
कमांड सरचना :-
$Chown<ownername>[:>groupname]>filename>
यहाँ ग्रुप का नाम दिया जाना वैकल्पिक है जब फाइल का स्वामी एवं ग्रुप दोनों बदलना हो |
Ex. $ 1s – Maruti
$1s-rw-1 users 35 june 15 18:35 Maruti
स्पष्ट है की अब फाइल का स्वामित्व user 1 को मिल गया है जिसका समूह users नाम से है
Ex2. $Chown user 1: Manager Maruti
$1s:– Maruti
Rwxr-
Who:- इस कमाण्ड के प्रयोग से सिस्टम पर वर्तमान में Login किये हुए यूजर की लिस्ट प्रदर्शित होती है इस कमाण्ड के द्वारा सभी यूजर के सम्बन्ध में विभिन्न जानकारी जैसे नाम, टर्मिनल नं., लॉग इन का समय, व दिनाॅक प्रदर्शित होती है।
$who {enter}
User names Terminal no. Login date Login Time
Hari tty10 Jan 14 12:30
Shyam tty10 Jan 14 13:00
Who command के द्वारा हम किसी विशेष यूजर के सम्बन्ध में समस्त जानकारी प्राप्त कर सकते है इसके लिये निम्न कमाण्ड प्रयोग किया जाता है ।
कमांड सरचना :-
$who <user name> {enter}
Ex. :- $who gour {enter}
उक्त कमाण्ड क्रियान्वित होने पर यदि gour user उपस्थित नहीं होगा तो निम्न सूचना प्रदर्शित होती है
gour does not exit
यदि यह यूजर उपस्थित है तो पूर्वानूसार केवल यूजरनेम के सम्बन्ध में जानकारी प्रदर्शित होती है।
यदि यूजर यह जानना चाहता है कि वह वर्तमान में किस लॉग इन पर कार्य कर रहा है तो उसके लिए निम्न कमाण्ड प्रयोग किया जाता है
$who I am {enter}
इससे जिस यूजर पर लाॅगिंन किये हुये है उससे सम्बन्धित सूचना प्रदर्शित होती है।