User Tools

Site Tools


perso:dump:lnx:list_of_useful_commands

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
perso:dump:lnx:list_of_useful_commands [2015/05/18 11:33]
Jean-Christophe Berthon Added some more zypper command and an new lsof example usage
perso:dump:lnx:list_of_useful_commands [2015/06/18 20:33]
Jean-Christophe Berthon [Deb based package system]
Line 33: Line 33:
 === apt-get commands === === apt-get commands ===
 Here are a dump collection of useful commands with apt/deb system: Here are a dump collection of useful commands with apt/deb system:
-  * ''​apt-get build-dep inkscape'':​ will retrieve the development libraries that are required to build [[:​foss:​wikishelf:​inkscape|inkscape]] +  * ''​%%apt-get build-dep inkscape%%'':​ will retrieve the development libraries that are required to build [[:​foss:​wikishelf:​inkscape|inkscape]] 
-  * ''​apt-get update'':​ fetch the latest list of applications from the repositories +  * ''​%%apt-get update%%'':​ fetch the latest list of applications from the repositories 
-  * ''​apt-get upgrade'':​ upgrade your applications if some newer release are available in the repositories (once synchronised with apt-get update) +  * ''​%%apt-get upgrade%%'':​ upgrade your applications if some newer release are available in the repositories (once synchronised with apt-get update) 
-  * ''​apt-get dist-upgrade'':​ same as before, but smart upgrade are performed (will explained that later, I'm not sure anymore what exactly smart is) +  * ''​%%apt-get dist-upgrade%%'':​ same as before, but smart upgrade are performed (will explained that later, I'm not sure anymore what exactly smart is) 
-  * ''​apt-get source inkscape'':​ get the source of inkscape in your current local directory, ready to be compiled and packaged. +  * ''​%%apt-get source inkscape%%'':​ get the source of inkscape in your current local directory, ready to be compiled and packaged. 
-  * ''​apt-get install inkscape'':​ will install the binary package called inkscape.+  * ''​%%apt-get install inkscape%%'':​ will install the binary package called inkscape. 
 +  * ''​%%apt-get remove inkscape%%'':​ will uninstall the binary package called inkscape (but possibly not all system configuration files) 
 +  * ''​%%apt-get remove --purge inkscape%%'':​ will uninstall the binary package called inkscape (and purge all possible files installed by the package)
  
 === aptitude commands === === aptitude commands ===
-  * ''​aptitude update'':​ fetch the latest list of applications from the repositories +  * ''​%%aptitude update%%'':​ fetch the latest list of applications from the repositories 
-  * ''​aptitude safe-upgrade'':​ upgrade your applications if some newer release are available in the repositories (once synchronised with apt-get update) +  * ''​%%aptitude safe-upgrade%%'':​ upgrade your applications if some newer release are available in the repositories (once synchronised with apt-get update) 
-  * ''​aptitude full-upgrade'':​ same as before, but smart upgrade are performed (will explained that later, I'm not sure anymore what exactly smart is) +  * ''​%%aptitude full-upgrade%%'':​ same as before, but smart upgrade are performed (will explained that later, I'm not sure anymore what exactly smart is) 
-  * ''​aptitude install inkscape'':​ will install the binary package called inkscape. +  * ''​%%aptitude install inkscape%%'':​ will install the binary package called inkscape. 
-  * ''​aptitude remove inkscape'':​ will uninstall the binary package called inkscape.+  * ''​%%aptitude remove inkscape%%'':​ will uninstall the binary package called inkscape.
  
 === dpkg commands === === dpkg commands ===
-  * ''​dpkg --get-selections'':​ will list all installed packaged +  * ''​%%dpkg --get-selections%%'':​ will list all installed packaged 
-  * ''​dpkg-reconfigure packagename'':​ will reconfigure the package, useful to reconfigure some packages such as apache, mysql, xorg, etc.+  * ''​%%dpkg-reconfigure packagename%%'':​ will reconfigure the package, useful to reconfigure some packages such as apache, mysql, xorg, etc. 
 + 
 +=== Checking which services to restart after update/​upgrade === 
 + 
 +  * ''​%%lsof +L1 -R%%''​ 
 +  * Check in the list of files (rightmost column) that the files are under a system folder such as ''/​usr''​ 
  
 === Synaptic package manager === === Synaptic package manager ===
Line 56: Line 64:
  
 ==== RPM based package system ==== ==== RPM based package system ====
 +
 +There is the generic ''​rpm''​ command.
   * ''​rpm -Uvh package.rpm'':​ install a downloaded RPM package   * ''​rpm -Uvh package.rpm'':​ install a downloaded RPM package
-  ​* ''​yum ​update'': ​+ 
 +Then on Fedora (up to release 21) and CentOS/​RHEL,​ there is ''​yum''​ which allows to manage online repository of rpm packages. 
 +  ​* ''​yum ​upgrade'': ​
   * ''​yum install packages'':​ install package(s) from the repositories   * ''​yum install packages'':​ install package(s) from the repositories
   * ''​yum remove packages'':​ remove an installed package(s)   * ''​yum remove packages'':​ remove an installed package(s)
   * ''​yum list'':​ List packages (installed and available)   * ''​yum list'':​ List packages (installed and available)
 +
 +Not always present/​install are plugins for yum to check which services need to be restarted after an upgrade.
 +  * ''​yum ps''​ based on the yum ps plugin;
 +  * ''​needs-restarting''​ based on ;
 +  * Without using yum, and it works for all Linux systems (whether using RPM or not)
 +    * ''​%%lsof +L1 -R%%''​
 +    * Check in the list of files (rightmost column) that the files are under a system folder such as ''/​usr''​
 +
 +Fedora 22 and newer have replaced ''​yum''​ by ''​dnf''​ and it is possible that future releases of CentOS/RHEL will follow suit.
 +  * ''​dnf upgrade'': ​
 +  * ''​dnf install packages'':​ install package(s) from the repositories
 +  * ''​dnf remove packages'':​ remove an installed package(s)
 +  * ''​dnf list'':​ List packages (installed and available)
  
  
perso/dump/lnx/list_of_useful_commands.txt · Last modified: 2015/06/18 20:33 by Jean-Christophe Berthon