Ubuntu: Difference between revisions

From Halfface
Jump to navigation Jump to search
Line 11: Line 11:
  apt-get update
  apt-get update


==show installed packages in cronological order==
=show installed packages in cronological order=
  cat /var/log/dpkg.log* | grep "\ install\ " | sort | less
  cat /var/log/dpkg.log* | grep "\ install\ " | sort | less


==Installed packages.==
=Installed packages.=
  dpkg --get-selections
  dpkg --get-selections
  apt-get install openssh-client openssh-server
  apt-get install openssh-client openssh-server


==List packages on one machine and install on another.==
=List packages on one machine and install on another.=
  dpkg --get-selections > installed-software
  dpkg --get-selections > installed-software
  dpkg --set-selections < installed-software
  dpkg --set-selections < installed-software
  dselect
  dselect


==Upgrade.==
=Upgrade.=
  sudo apt-get -y update
  sudo apt-get -y update
  sudo apt-get -y upgrade
  sudo apt-get -y upgrade


==Which package provides.==
=Which package provides.=
  http://packages.ubuntu.com/
  http://packages.ubuntu.com/


==List available linux packages.==
=List available linux packages.=
  apt-cache pkgnames
  apt-cache pkgnames


==install local deb packages==
=install local deb packages=
  sudo dpkg -i 1.deb 2.deb  
  sudo dpkg -i 1.deb 2.deb  
==install from experimental==
=install from experimental=
  # add next row to /etc/apt/sources.list and do an apt-get update
  # add next row to /etc/apt/sources.list and do an apt-get update
  deb http://ftp.debian.org/debian/ experimental main contrib non-free
  deb http://ftp.debian.org/debian/ experimental main contrib non-free
  # Then install latest version of ekiga.
  # Then install latest version of ekiga.
  apt-get -t experimental install ekiga
  apt-get -t experimental install ekiga
==add gpg key==
=add gpg key=
  gpg --keyserver subkeys.pgp.net --recv-keys AED4B06F473041FA
  gpg --keyserver subkeys.pgp.net --recv-keys AED4B06F473041FA
  gpg -a --export AED4B06F473041FA | sudo apt-key add -
  gpg -a --export AED4B06F473041FA | sudo apt-key add -
==clean /var/cache/apt==
=clean /var/cache/apt=
  sudo apt-get clean
  sudo apt-get clean
=which version is available and installed(*** means installed)=
=which version is available and installed(*** means installed)=
  apt-cache policy apache2-bin
  apt-cache policy apache2-bin

Revision as of 10:04, 28 September 2020

Which package contains file

apt-file search filename
dpkg -S /usr/sbin/apache2

List contents of package

$ apt-file list packagename

Update apt-file database

apt-file update

updates the list of available packages and their versions

apt-get update

show installed packages in cronological order

cat /var/log/dpkg.log* | grep "\ install\ " | sort | less

Installed packages.

dpkg --get-selections
apt-get install openssh-client openssh-server

List packages on one machine and install on another.

dpkg --get-selections > installed-software
dpkg --set-selections < installed-software
dselect

Upgrade.

sudo apt-get -y update
sudo apt-get -y upgrade

Which package provides.

http://packages.ubuntu.com/

List available linux packages.

apt-cache pkgnames

install local deb packages

sudo dpkg -i 1.deb 2.deb 

install from experimental

# add next row to /etc/apt/sources.list and do an apt-get update
deb http://ftp.debian.org/debian/ experimental main contrib non-free
# Then install latest version of ekiga.
apt-get -t experimental install ekiga

add gpg key

gpg --keyserver subkeys.pgp.net --recv-keys AED4B06F473041FA
gpg -a --export AED4B06F473041FA | sudo apt-key add -

clean /var/cache/apt

sudo apt-get clean

which version is available and installed(*** means installed)

apt-cache policy apache2-bin