March 20, 2016

Common Linux Command

Common Linux Command

Access Linux Directory

Format Definition Example
cd [option] [directory] Access Directory cd /var/lib/dpkg/updates
cd / or cd .. Exit Directory cd / or cd ..
sudo apt-get update update package sudo apt-get update
sudo apt-get upgrade upgrade package sudo apt-get upgrade
sudo apt-get install [package name] install package sudo apt-get install ubuntu-gnome-desktop
clear clear terminal screen command clear
sudo rm [directory/files] delete or remove file sudo rm /var/lib/apt/lists/lock; sudo rm /var/cache/apt/archives/lock
poweroff Power off poweroff
sudo nano [directory/filename] Edit File name and Config sudo nano /etc/network/interfaces
dir [OPTION]... [FILE]... list directory contents dir -a
su access admin for config admin parameter su
sudo apt-get --purge remove [Package] remove package or uninstall package sudo apt-get --purge remove postgresql
dpkg -l | grep [Package] check package list pending on systems dpkg -l | grep postgres
Ctrl-D Logout Terminal SSH, Log out Ubuntu Terminal Ctrl-D
mv old-file-name new-file-name Rename Linux file mv im_odoo_support.xml im_odoo_support1.xml
cp old-file-name new-file-name Copy Linux file mv im_odoo_support.xml im_odoo_support1.xml
rm {file-name} delete Linux file rm im_odoo_support.xml
find . -name {filename}\* find file name all location in linux directory or folder find . -name web.\*
grep -rnw '/your/folder/path/' -e "your text here" find text all file in specified path grep -rnw '/usr/lib/python2.7/dist-packages/openerp/addons/' -e "o_mail_request_permission"

No comments: