Saturday, July 10, 2010

Ubuntu (Linux) को Terminal मा प्रयोग हुने महत्वपुर्ण command

त्यसो त माईक्रोसफ्टको UAC (User Access Control) पनि कम झन्झटिलो छैन । तर यता लिनक्स पट्टी लाग्ने हो भने पाईला पाईलामा अथेन्टीकेशन र Folder Permission को कुरा आँउछ । कहिले काँही कुनै folder अनि त्यसको sub folder आदीमा permission सेट गर्दा गर्दा थाकिन्छ । यस्तो वेलामा तल दिएको command को प्रयोग गरे दिएको folder अनि त्यसको sub folder मा एकै पटक permission दिने काम गर्न सकिन्छ ।
sudo chmod -R 777 /directory
तल दिएको command ले Terminal मा काम गरी रहेको बेला आफु कुन Directory मा काम गरी रहेको थाहा पाउन सकिन्छ ।
pwd
sudo command ले कुनै काम सम्पन्न गर्न आदेश दिने युजर सुपर युजर वा पुरै administrative privilege पाएको युजर हो हैन निक्योल गर्छ ।
sudo

तल दिएको command ले Current Directory मा भएको files को लिष्ट देखाउन सकिन्छ ।
ls
Windows को DOS मा झै Ubuntu मा पनि cd command ले Directory Navigate गर्न सकिन्छ ।
To navigate into the root directory, use "cd /"
To navigate to your home directory, use "cd" or "cd ~"
To navigate up one directory level, use "cd .."
To navigate to the previous directory (or back), use "cd -"
Ubuntu मा cp command ले फाईल कपि गर्न सकिन्छ । तल दिएको command ले file नाम गरेको फाईल लाई foo नाम दिएर कपी गर्ने काम गर्छ । तर cp command मा mv command प्रयोग गर्ने हो भने file नाम गरेको फाईल मुभ भएर foo नाम दिएर मुभ हुन्छ ।
cp file foofoo
mv file foo
फाईल Delete गर्न rm command प्रयोग गर्नु पर्छ भने Folder Delete गर्न rmdir command प्रयोग गर्न सकिन्छ ।
rm file
rmdir folder
कुनै command वा programme को वारेमा जान्न हामी "man" command को प्रयोग गर्न सक्छौ । उदारणको लागी तल दिए जसो गर्दा mv command कहाँ कहाँ कसरी प्रयोग गर्न सकिन्छ भन्ने थाहा लाग्छ ।
man mv
युबुन्तुमा command line बाट कुनै सफ्टवेयर Install, Uninstall आदी काम गर्न apt-get command को प्रयोग गरिन्छ । apt भन्नाले Advanced Packaging Tool (APT) भन्ने बुझिन्छ ।
sudo apt-get (install | remove | update | autoremove | purge | source | build-dep | dist-upgrade | clean | check) nmap
ब्राकेट भित्र भएकोहरुमा एक पटकमा कुनै एक वटा मात्र प्रयोग गरिन्छ । माथि ब्राकेटमा दिएका command को अर्थ तल दिएको छ ।
update - Retrieve new lists of packages
upgrade - Perform an upgrade
install - Install new packages (pkg is libc6 not libc6.deb)
remove - Remove packages
autoremove - Remove automatically all unused packages
purge - Remove packages and config files
source - Download source archives
build-dep - Configure build-dependencies for source packages
dist-upgrade - Distribution upgrade, see apt-get(8)
dselect-upgrade - Follow dselect selections
clean - Erase downloaded archive files
autoclean - Erase old downloaded archive files
check - Verify that there are no broken dependencies
Ubuntu चलाउदाँ सिस्टम फाईल Edit गर्न परे त्यस फाईल लाई एक्सेस गर्ने privilege पाएको हुनु पर्५ । अन्यथा यो काम super user ले गर्न सक्% । उदारणको लागी Apache चलाउन त्यसको कन्फिगर फाईल edit गर्न परे तल दिए जस्तो लेख्नु पर्५ ।
sudo gedit /filelocation
e.g. sudo gedit /etc/apache2/apache2.conf
कम्प्युटर बन्द गर्न परे
sudo halt
OR : sudo shutdown -h now
कम्प्युटर रिस्टार्ट गर्न परे
sudo reboot
Network service मात्र Restart गर्न परे
sudo /etc/init.d/networking restart

No comments:

Post a Comment

तपाँईको सल्लाह सुझाव सदैव स्वागत गरीने छ।