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/06/18 13:22]
Jean-Christophe Berthon [RPM based package system] add dnf and other info such as list of process needing restart
perso:dump:lnx:list_of_useful_commands [2015/06/18 20:33] (current)
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 70: Line 78:
   * ''​needs-restarting''​ based on ;   * ''​needs-restarting''​ based on ;
   * Without using yum, and it works for all Linux systems (whether using RPM or not)   * Without using yum, and it works for all Linux systems (whether using RPM or not)
-    * ''​lsof ​| egrep "​DEL|deleted"​ | awk ' { printf("​%s\t%s\n", $1, $2}' ​| sort -u''​+    * ''​%%lsof +L1 -R%%''​ 
 +    * Check in the list of files (rightmost columnthat 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. Fedora 22 and newer have replaced ''​yum''​ by ''​dnf''​ and it is possible that future releases of CentOS/RHEL will follow suit.
perso/dump/lnx/list_of_useful_commands.1434626542.txt.gz · Last modified: 2015/06/18 13:22 by Jean-Christophe Berthon