
Terminal - Commands using apt - 38 results
apt-get install phpmyadmin; echo "Include /etc/phpmyadmin/apache.conf" >> /etc/apache2/apache2.conf; service apache2 restart
This is sample output - yours may be different.
This command will install phpmyadmin, set apache2 server and restart apache2. After running this command you can open phpmyadmin on http://yoursite.com/phpmyadmin
apt-get -s upgrade | awk '/Inst.+/ {print $2}'
This is sample output - yours may be different.
Usefull if you only want to see the package names, or if you want to use them in a script.
apt-get --ignore-hold --allow-unauthenticated -s dist-upgrade | grep ^Inst | cut -d ' ' -f2
This is sample output - yours may be different.
linux-image-3.2.0-35-virtual
gpgv
gnupg
man-db
linux-image-virtual
Taken from apticron and modified.
This is sample output - yours may be different.
php-pear - PEAR - PHP Extension and Application Repository
php5 - server-side, HTML-embedded scripting language (metapackage)
php5-cgi - server-side, HTML-embedded scripting language (CGI binary)
php5-cli - command-line interpreter for the php5 scripting language
php5-common - Common files for packages built from the php5 source
php5-curl - CURL module for php5
php5-dbg - Debug symbols for PHP5
php5-dev - Files for PHP5 module development
php5-gd - GD module for php5
php5-gmp - GMP module for php5
php5-ldap - LDAP module for php5
php5-mysql - MySQL module for php5
php5-odbc - ODBC module for php5
php5-pgsql - PostgreSQL module for php5
php5-pspell - pspell module for php5
php5-recode - recode module for php5
php5-snmp - SNMP module for php5
php5-sqlite - SQLite module for php5
php5-tidy - tidy module for php5
php5-xmlrpc - XML-RPC module for php5
php5-xsl - XSL module for php5
Can't remember what that one package was called? Search for it!
It's also a good idea to run
apt-get update
first.
This is sample output - yours may be different.
apt-popcon() { (echo \#rank; apt-cache search "$@" |awk '$1 !~ /^lib/ {print " "$1" "}') |grep -Ff- <(wget -qqO- http://popcon.debian.org/by_inst.gz |gunzip); }
This is sample output - yours may be different.
$ apt-popcon pdf 'viewer|reader'
#rank name inst vote old recent no-files (maintainer)
437 poppler-utils 66519 10611 46940 8953 15 (Loic Minier)
794 evince 49734 31780 11813 6129 12 (Debian Gnome Maintainers)
891 evince-common 46071 0 0 0 46071 (Debian Gnome Maintainers)
1768 texlive-base 21932 10747 9236 1927 22 (Debian Tex Maintainers)
2235 gir1.2-evince-3.0 14571 3403 4527 6640 1 (Debian Gnome Maintainers)
2366 texlive-latex-extra 13550 1690 8065 3792 3 (Debian Tex Maintainers)
2370 gnome-sushi 13512 1435 8648 3427 2 (Debian Gnome Maintainers)
2444 okular 12726 8158 3776 791 1 (Debian Qt/kde Maintainers)
2696 xpdf 10854 5399 5027 403 25 (Michael Gilbert)
3385 gv 6570 3344 3083 141 2 (Bernhard R. Link)
4004 epdfview 4861 2606 1567 687 1 (Yves-alexis Perez)
4603 xpdf-reader 3491 249 1105 14 2123 (Michael Gilbert)
4615 calibre-bin 3479 934 1986 557 2 (Miriam Ruiz)
4653 calibre 3425 935 1959 531 0 (Miriam Ruiz)
5461 antiword 2396 1108 1225 62 1 (Olly Betts)
5685 mozplugger 2173 1513 631 29 0 (Alessio Treglia)
This will take the packages matching a given `apt-cache search` query (a collection of AND'd words or regexps) and tell you how popular they are. This is particularly nice for those times you have to figure out which solution to use for e.g. a PDF reader or a VNC client.
Substitute "ubuntu.com" for "debian.org" if you want this to use Ubuntu's data instead. Everything else will work perfectly.
apt-file --package-only search /lib/firmware
This is sample output - yours may be different.
apt-get -y install/remove app
This is sample output - yours may be different.
apt-get -s upgrade | awk '/[0-9]+ upgraded,/ {print $1 " package updates are available"}'
This is sample output - yours may be different.
65 package updates are available
This let's you find out the total packages that have available upgrades. Usefull if you want to check or show the total available upgrades on your system.
This is sample output - yours may be different.
APT "";
APT::Architecture "amd64";
APT::Build-Essential "";
APT::Build-Essential:: "build-essential";
APT::Install-Recommends "true";
APT::Install-Suggests "0";
APT::NeverAutoRemove "";
APT::NeverAutoRemove:: "^firmware-linux.*";
Shows all configurations to apt and dpkg, rarely changed, you probably still have the default configuration. Go ahead and explore your configuration if you dare, perhaps change your apt-cache directory, Dir::Cache "var/cache/apt/"; or the names of the log files.
apt-get remove $(dpkg -l | awk "/^ii linux-(image|headers)/ && ! /`uname -r`/ {print \$2}")
This is sample output - yours may be different.
since awk was already there one can use it instead of the 2 greps. might not be faster, but fast enough
This is sample output - yours may be different.
mythtv:
Installed: (none)
Candidate: 2:0.24.1+fixes.20110802.d525265-0ubuntu0mythbuntu1
Version table:
2:0.24.1+fixes.20110802.d525265-0ubuntu0mythbuntu1 0
500 http://ppa.launchpad.net/mythbuntu/0.24/ubuntu/ lucid/main Packages
0.23.0+fixes24158-0ubuntu2 0
500 http://us.archive.ubuntu.com/ubuntu/ lucid/multiverse Packages
Use this command to determine what version of MythTV you are running on a Debian system. Tested on a Mythbuntu installation.
This is sample output - yours may be different.
apt-cache rdepends <packagename>
This is sample output - yours may be different.
$ apt-cache rdepends tar
tar
Reverse Depends:
file-roller
vfu
newlib-source
|dvbackup
dump
amanda-common
file-roller
backuppc
apt-cache depends <packagename>
This is sample output - yours may be different.
$ apt-cache depends tar
tar
PreDepends: libc6
Suggests: bzip2
Suggests: ncompress
Suggests: xz-utils
Conflicts: cpio
Breaks: dpkg-dev
Replaces: cpio
apt-get install `ssh root@host_you_want_to_clone "dpkg -l | grep ii" | awk '{print $2}'`
This is sample output - yours may be different.
apt-cache search pidgin* | awk '{print$ 1}' | tr '\n' ' ' | xargs aptitude -y install
This is sample output - yours may be different.
Command to install everything on a debian based system with the prefix you indicate.
apt-show-versions | grep '\bpython\b'
This is sample output - yours may be different.
apt-get -y install git-core gitosis; adduser --home /home/git --gecos "git user" git; su git -c "ssh-keygen -t rsa -f /home/git/.ssh/id_rsa; gitosis-init < ~/.ssh/id_rsa"
This is sample output - yours may be different.
After, check if working by executing this command locally :
git clone git@192.168.0.18:repositories/gitosis-admin.git
Tutorial :
http://blog.hemca.com/?p=560
apt-cache search perl | grep module | awk '{print $1;}' | xargs sudo apt-get install -y
This is sample output - yours may be different.
I used this to mass install a lot of perl stuff. Threw it together because I was feeling *especially* lazy. The 'perl' and the 'module' can be replaced with whatever you like.
apt-get remove `deborphan`
This is sample output - yours may be different.
apt-get search something | grep specific
This is sample output - yours may be different.
$ apt-get search firefox | grep
gnome-do-plugins-firefox : gnome-do-plugins for firefox
gnome-do-plugins : Plugins for GNOME Do
replace apt-get with your distro's package manager.
Where 'something' is the package name, and 'specific' is what you're specifically looking for.
This helps if your query is 2+ words long.
apt-show-versions <packagename>
This is sample output - yours may be different.
apt-show-versions iceweasel
iceweasel/sid uptodate 3.5.9-3
apt-show-versions kdebase-runtime
kdebase-runtime/sid upgradeable from 4:4.4.3-1 to 4:4.4.4-1
If there is update available for the package you can see upgrade is from which version to which version. Also you will get detail about which release the package belongs to (stable/testing/sid).
apt-cache show pkgname | grep -i "version:"
This is sample output - yours may be different.
$apt-cache show freemind | grep -i "version:"
Version: 0.9.0~rc6+dfsg-1ubuntu1
if you don't want to show string "version?, then use awk or cut filter it: apt-cache show pkgname | grep -i "version:" | awk '{ print $2 }'
we can also use regex to search many packages and show their versions:
apt-cache search pkgregex | grep -i "version:"
apt-get --just-print upgrade
This is sample output - yours may be different.