<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SavvyAdmin.com &#187; Debian</title>
	<atom:link href="http://savvyadmin.com/tag/debian/feed/" rel="self" type="application/rss+xml" />
	<link>http://savvyadmin.com</link>
	<description>For savvy admins everywhere...</description>
	<lastBuildDate>Sun, 20 Jun 2010 21:53:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Download PGP Keys with Apt-key</title>
		<link>http://savvyadmin.com/download-pgp-keys-with-apt-key/</link>
		<comments>http://savvyadmin.com/download-pgp-keys-with-apt-key/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 23:46:11 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[APT]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/?p=463</guid>
		<description><![CDATA[When adding third party software repositories to your APT sources list, you can easily download a referenced PGP key to your APT keyring using the advanced options of the apt-key utility. For example, if you are adding a third party repository that references the PGP key ID of 6E80C6B7, the following will work as long [...]


Related posts:<ol><li><a href='http://savvyadmin.com/useful-apt-aliases/' rel='bookmark' title='Permanent Link: Useful APT Aliases'>Useful APT Aliases</a></li>
<li><a href='http://savvyadmin.com/backup-and-restore-package-lists-in-ubuntu/' rel='bookmark' title='Permanent Link: Backup and Restore Package Lists in Ubuntu'>Backup and Restore Package Lists in Ubuntu</a></li>
<li><a href='http://savvyadmin.com/grep-in-color/' rel='bookmark' title='Permanent Link: Grep in Color'>Grep in Color</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>When adding third party software repositories to your APT sources list, you can easily download a referenced PGP key to your APT keyring using the advanced options of the <strong><code>apt-key</code></strong> utility.</p>
<p>For example, if you are adding a third party repository that references the PGP key ID of <code>6E80C6B7</code>, the following will work as long as the key has been uploaded to a keyserver.</p>
<blockquote><p><code><strong>sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6E80C6B7</strong><br />
gpg: requesting key 6E80C6B7 from hkp server keyserver.ubuntu.com<br />
gpg: key 6E80C6B7: public key "Launchpad PPA for Banshee Team" imported<br />
gpg: no ultimately trusted keys found<br />
gpg: Total number processed: 1<br />
gpg:               imported: 1  (RSA: 1)</code></p></blockquote>
<p>Typically, instructions on adding repositories give readers a two or three step process that involves apt-key reading a key from a text file or piped from a wget command.  The above just cuts all that nonsense out.</p>
<p>The <code><strong>apt-key</strong></code> man page is a bit bare, but there are a few other options you might find interesting that are only mentioned in the commands help output.</p>
<blockquote><p>
<code><strong>apt-key</strong><br />
Usage: apt-key [command] [arguments]</code></p>
<p><code>Manage apt's list of trusted keys</code></p>
<p><code>  apt-key add <file>          - add the key contained in <file> ('-' for stdin)<br />
  apt-key del <keyid>         - remove the key <keyid><br />
  apt-key export <keyid>      - output the key <keyid><br />
  apt-key exportall           - output all trusted keys<br />
  apt-key update              - update keys using the keyring package<br />
  apt-key net-update          - update keys using the network<br />
  apt-key list                - list keys<br />
  apt-key finger              - list fingerprints<br />
  apt-key adv                 - pass advanced options to gpg (download key)</code></p></blockquote>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fsavvyadmin.com%2Fdownload-pgp-keys-with-apt-key%2F&amp;partner=sociable" title="Print"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fsavvyadmin.com%2Fdownload-pgp-keys-with-apt-key%2F&amp;t=Download%20PGP%20Keys%20with%20Apt-key" title="Facebook"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=Download%20PGP%20Keys%20with%20Apt-key%20-%20http%3A%2F%2Fsavvyadmin.com%2Fdownload-pgp-keys-with-apt-key%2F" title="Twitter"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fsavvyadmin.com%2Fdownload-pgp-keys-with-apt-key%2F&amp;title=Download%20PGP%20Keys%20with%20Apt-key&amp;notes=When%20adding%20third%20party%20software%20repositories%20to%20your%20APT%20sources%20list%2C%20you%20can%20easily%20download%20a%20referenced%20PGP%20key%20to%20your%20APT%20keyring%20using%20the%20advanced%20options%20of%20the%20apt-key%20utility.%0D%0A%0D%0AFor%20example%2C%20if%20you%20are%20adding%20a%20third%20party%20repository%20tha" title="del.icio.us"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://savvyadmin.com/feed/" title="RSS"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fsavvyadmin.com%2Fdownload-pgp-keys-with-apt-key%2F&amp;title=Download%20PGP%20Keys%20with%20Apt-key&amp;bodytext=When%20adding%20third%20party%20software%20repositories%20to%20your%20APT%20sources%20list%2C%20you%20can%20easily%20download%20a%20referenced%20PGP%20key%20to%20your%20APT%20keyring%20using%20the%20advanced%20options%20of%20the%20apt-key%20utility.%0D%0A%0D%0AFor%20example%2C%20if%20you%20are%20adding%20a%20third%20party%20repository%20tha" title="Digg"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="mailto:?subject=Download%20PGP%20Keys%20with%20Apt-key&amp;body=http%3A%2F%2Fsavvyadmin.com%2Fdownload-pgp-keys-with-apt-key%2F" title="email"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fsavvyadmin.com%2Fdownload-pgp-keys-with-apt-key%2F&amp;title=Download%20PGP%20Keys%20with%20Apt-key&amp;source=SavvyAdmin.com+For+savvy+admins+everywhere...&amp;summary=When%20adding%20third%20party%20software%20repositories%20to%20your%20APT%20sources%20list%2C%20you%20can%20easily%20download%20a%20referenced%20PGP%20key%20to%20your%20APT%20keyring%20using%20the%20advanced%20options%20of%20the%20apt-key%20utility.%0D%0A%0D%0AFor%20example%2C%20if%20you%20are%20adding%20a%20third%20party%20repository%20tha" title="LinkedIn"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fsavvyadmin.com%2Fdownload-pgp-keys-with-apt-key%2F" title="Identi.ca"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fsavvyadmin.com%2Fdownload-pgp-keys-with-apt-key%2F&amp;title=Download%20PGP%20Keys%20with%20Apt-key&amp;annotation=When%20adding%20third%20party%20software%20repositories%20to%20your%20APT%20sources%20list%2C%20you%20can%20easily%20download%20a%20referenced%20PGP%20key%20to%20your%20APT%20keyring%20using%20the%20advanced%20options%20of%20the%20apt-key%20utility.%0D%0A%0D%0AFor%20example%2C%20if%20you%20are%20adding%20a%20third%20party%20repository%20tha" title="Google Bookmarks"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fsavvyadmin.com%2Fdownload-pgp-keys-with-apt-key%2F&amp;title=Download%20PGP%20Keys%20with%20Apt-key" title="StumbleUpon"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://savvyadmin.com/useful-apt-aliases/' rel='bookmark' title='Permanent Link: Useful APT Aliases'>Useful APT Aliases</a></li>
<li><a href='http://savvyadmin.com/backup-and-restore-package-lists-in-ubuntu/' rel='bookmark' title='Permanent Link: Backup and Restore Package Lists in Ubuntu'>Backup and Restore Package Lists in Ubuntu</a></li>
<li><a href='http://savvyadmin.com/grep-in-color/' rel='bookmark' title='Permanent Link: Grep in Color'>Grep in Color</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/download-pgp-keys-with-apt-key/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Backup and Restore Package Lists in Ubuntu</title>
		<link>http://savvyadmin.com/backup-and-restore-package-lists-in-ubuntu/</link>
		<comments>http://savvyadmin.com/backup-and-restore-package-lists-in-ubuntu/#comments</comments>
		<pubDate>Sun, 19 Oct 2008 21:34:14 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/?p=254</guid>
		<description><![CDATA[Here&#8217;s a simple tutorial on how to backup a list of all your installed repository applications, and restore them to another machine, perhaps even the same machine after a clean installation.  This can save you an incredible amount of time, especially when this task must be repeated often.  Of course, being that Ubuntu is based [...]


Related posts:<ol><li><a href='http://savvyadmin.com/useful-apt-aliases/' rel='bookmark' title='Permanent Link: Useful APT Aliases'>Useful APT Aliases</a></li>
<li><a href='http://savvyadmin.com/ubuntu-studio/' rel='bookmark' title='Permanent Link: Ubuntu Studio'>Ubuntu Studio</a></li>
<li><a href='http://savvyadmin.com/oracle-database-10g-xe-on-ubuntu/' rel='bookmark' title='Permanent Link: Oracle Database 10g XE on Ubuntu'>Oracle Database 10g XE on Ubuntu</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a simple tutorial on how to backup a list of all your installed repository applications, and restore them to another machine, perhaps even the same machine after a clean installation.  This can save you an incredible amount of time, especially when this task must be repeated often.  Of course, being that Ubuntu is based on Debian, this will work for any Debian based platform.</p>
<p>First, from a computer with all the applications preinstalled, retrieve your installed package list and redirect the output to a file called packages.txt.  Save this package list somewhere so that you can use it for the restore process.</p>
<blockquote><pre><strong>sudo dpkg --get-selections > packages.txt</strong></pre>
</blockquote>
<p>To restore all the applications from your list, you must follow a three step process very carefully.</p>
<blockquote><pre><strong>sudo dpkg --clear-selections
sudo dpkg --set-selections &lt; packages.txt
sudo aptitude install</strong></pre>
</blockquote>
<p>You will be prompted to install all the new applications in the list.</p>
<p>Another example of what this process allows you to do is create a baseline of all the applications after a clean installation of Ubuntu.  Let&#8217;s say you would like to remove any applications installed since the clean install, perform the exact same process, and any package not defined in that list will be removed.</p>
<blockquote><pre><strong>sudo dpkg --get-selections > clean-install-package-list.txt
sudo dpkg --clear-selections
sudo dpkg --set-selections < clean-install-package-list.txt
sudo aptitude install</strong></pre>
</blockquote>
<p>The very first command of &#8220;&#8211;clear-selections&#8221; marks all currently installed packages to the state &#8220;deinstall&#8221;.  When you restore the list of applications using &#8220;&#8211;set-selections&#8221;, only packages ommited from the list will remain in the &#8220;deinstall&#8221; state.  Aptitude will honor the deinstall state and remove the extra packages, leaving you only with packages from the list.  Most excellent.  :-)</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fsavvyadmin.com%2Fbackup-and-restore-package-lists-in-ubuntu%2F&amp;partner=sociable" title="Print"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fsavvyadmin.com%2Fbackup-and-restore-package-lists-in-ubuntu%2F&amp;t=Backup%20and%20Restore%20Package%20Lists%20in%20Ubuntu" title="Facebook"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=Backup%20and%20Restore%20Package%20Lists%20in%20Ubuntu%20-%20http%3A%2F%2Fsavvyadmin.com%2Fbackup-and-restore-package-lists-in-ubuntu%2F" title="Twitter"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fsavvyadmin.com%2Fbackup-and-restore-package-lists-in-ubuntu%2F&amp;title=Backup%20and%20Restore%20Package%20Lists%20in%20Ubuntu&amp;notes=Here%27s%20a%20simple%20tutorial%20on%20how%20to%20backup%20a%20list%20of%20all%20your%20installed%20repository%20applications%2C%20and%20restore%20them%20to%20another%20machine%2C%20perhaps%20even%20the%20same%20machine%20after%20a%20clean%20installation.%C2%A0%20This%20can%20save%20you%20an%20incredible%20amount%20of%20time%2C%20especiall" title="del.icio.us"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://savvyadmin.com/feed/" title="RSS"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fsavvyadmin.com%2Fbackup-and-restore-package-lists-in-ubuntu%2F&amp;title=Backup%20and%20Restore%20Package%20Lists%20in%20Ubuntu&amp;bodytext=Here%27s%20a%20simple%20tutorial%20on%20how%20to%20backup%20a%20list%20of%20all%20your%20installed%20repository%20applications%2C%20and%20restore%20them%20to%20another%20machine%2C%20perhaps%20even%20the%20same%20machine%20after%20a%20clean%20installation.%C2%A0%20This%20can%20save%20you%20an%20incredible%20amount%20of%20time%2C%20especiall" title="Digg"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="mailto:?subject=Backup%20and%20Restore%20Package%20Lists%20in%20Ubuntu&amp;body=http%3A%2F%2Fsavvyadmin.com%2Fbackup-and-restore-package-lists-in-ubuntu%2F" title="email"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fsavvyadmin.com%2Fbackup-and-restore-package-lists-in-ubuntu%2F&amp;title=Backup%20and%20Restore%20Package%20Lists%20in%20Ubuntu&amp;source=SavvyAdmin.com+For+savvy+admins+everywhere...&amp;summary=Here%27s%20a%20simple%20tutorial%20on%20how%20to%20backup%20a%20list%20of%20all%20your%20installed%20repository%20applications%2C%20and%20restore%20them%20to%20another%20machine%2C%20perhaps%20even%20the%20same%20machine%20after%20a%20clean%20installation.%C2%A0%20This%20can%20save%20you%20an%20incredible%20amount%20of%20time%2C%20especiall" title="LinkedIn"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fsavvyadmin.com%2Fbackup-and-restore-package-lists-in-ubuntu%2F" title="Identi.ca"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fsavvyadmin.com%2Fbackup-and-restore-package-lists-in-ubuntu%2F&amp;title=Backup%20and%20Restore%20Package%20Lists%20in%20Ubuntu&amp;annotation=Here%27s%20a%20simple%20tutorial%20on%20how%20to%20backup%20a%20list%20of%20all%20your%20installed%20repository%20applications%2C%20and%20restore%20them%20to%20another%20machine%2C%20perhaps%20even%20the%20same%20machine%20after%20a%20clean%20installation.%C2%A0%20This%20can%20save%20you%20an%20incredible%20amount%20of%20time%2C%20especiall" title="Google Bookmarks"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fsavvyadmin.com%2Fbackup-and-restore-package-lists-in-ubuntu%2F&amp;title=Backup%20and%20Restore%20Package%20Lists%20in%20Ubuntu" title="StumbleUpon"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://savvyadmin.com/useful-apt-aliases/' rel='bookmark' title='Permanent Link: Useful APT Aliases'>Useful APT Aliases</a></li>
<li><a href='http://savvyadmin.com/ubuntu-studio/' rel='bookmark' title='Permanent Link: Ubuntu Studio'>Ubuntu Studio</a></li>
<li><a href='http://savvyadmin.com/oracle-database-10g-xe-on-ubuntu/' rel='bookmark' title='Permanent Link: Oracle Database 10g XE on Ubuntu'>Oracle Database 10g XE on Ubuntu</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/backup-and-restore-package-lists-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Useful APT Aliases</title>
		<link>http://savvyadmin.com/useful-apt-aliases/</link>
		<comments>http://savvyadmin.com/useful-apt-aliases/#comments</comments>
		<pubDate>Fri, 01 Jun 2007 06:54:29 +0000</pubDate>
		<dc:creator>gmendoza</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[APT]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.savvyadmin.com/2007/06/01/useful-apt-aliases/</guid>
		<description><![CDATA[If you&#8217;re an avid user of Ubuntu or other Debian based Linux distributions, then you&#8217;re probably very familiar with using APT and it&#8217;s related command line utilities. You might however find it useful to create some command line aliases that shorten the time it takes to type out these repetitive tasks. For example, "sudo apt-get [...]


Related posts:<ol><li><a href='http://savvyadmin.com/grep-in-color/' rel='bookmark' title='Permanent Link: Grep in Color'>Grep in Color</a></li>
<li><a href='http://savvyadmin.com/download-pgp-keys-with-apt-key/' rel='bookmark' title='Permanent Link: Download PGP Keys with Apt-key'>Download PGP Keys with Apt-key</a></li>
<li><a href='http://savvyadmin.com/backup-and-restore-package-lists-in-ubuntu/' rel='bookmark' title='Permanent Link: Backup and Restore Package Lists in Ubuntu'>Backup and Restore Package Lists in Ubuntu</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re an avid user of Ubuntu or other Debian based Linux distributions, then you&#8217;re probably very familiar with using APT and it&#8217;s related command line utilities. You might however find it useful to create some command line aliases that shorten the time it takes to type out these repetitive tasks.</p>
<p>For example,</p>
<blockquote><p><code>"<strong>sudo apt-get update</strong>" can be shortened to "<strong>agu</strong>".<br />
"<strong>sudo apt-get install</strong>" can be shortened to "<strong>agi</strong>".<br />
"<strong>sudo apt-get dist-upgrade</strong>" can be shorted to "<strong>agd</strong>".</code></p></blockquote>
<p>A very simple way to create a set of command line aliases would be to add them to your <code>~/.bashrc</code> file located in your users home directory. Here&#8217;s an example of some of my favorite APT aliases.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Favorite Aliases</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">agu</span>=<span style="color: #ff0000;">'sudo apt-get update'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">agi</span>=<span style="color: #ff0000;">'sudo apt-get install'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">agd</span>=<span style="color: #ff0000;">'sudo apt-get dist-upgrade'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">agr</span>=<span style="color: #ff0000;">'sudo apt-get remove'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">ags</span>=<span style="color: #ff0000;">'sudo aptitude search'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">agsh</span>=<span style="color: #ff0000;">'sudo apt-cache show'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">afs</span>=<span style="color: #ff0000;">'sudo apt-file search'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">afsh</span>=<span style="color: #ff0000;">'sudo apt-file show'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">afu</span>=<span style="color: #ff0000;">'sudo apt-file update'</span></pre></div></div>

<p>To apply the changes immediately to your bash profile without having to log out, simply run the following command:</p>
<blockquote><p><code><strong>. .bashrc</strong></code></p></blockquote>
<p>Now, if you want to install the &#8220;vim-full&#8221; package, simply issue the following command:</p>
<blockquote><p><code><strong>agi vim-full</strong></code></p></blockquote>
<p>Remember, because &#8220;sudo&#8221; has been added to your alias, you don&#8217;t have to type it every time. It will prompt you to use the password the first time, and won&#8217;t ask again for the duration of the defined timeout period. Cool?</p>
<p>&#8220;apt-file&#8221; is a very useful package you should install. The alias is defined above, but is not installed by default. It allows you to search for file names in all packages from all your defined repositories. For example, lets say you&#8217;ve tried to run an application and it claims that your&#8217;re missing the library &#8220;libstdc++.so.5.0.7&#8243;. The following example tells you which packages contains a file with that name, which you can then install.</p>
<blockquote><p><code><strong>afs libstdc++.so.5.0.7</strong><br />
libstdc++5: usr/lib/libstdc++.so.5.0.7<br />
libstdc++5-3.3-dbg: usr/lib/debug/libstdc++.so.5.0.7<br />
<strong>agi libstdc++5</strong></code></p></blockquote>
<p>Although these examples have been geared towards Debian and Ubuntu, you can obviously use aliases on any Unix-like operating system. The technique of applying them just varies depending on the shell environment you are using. Have fun!</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fsavvyadmin.com%2Fuseful-apt-aliases%2F&amp;partner=sociable" title="Print"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fsavvyadmin.com%2Fuseful-apt-aliases%2F&amp;t=Useful%20APT%20Aliases" title="Facebook"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=Useful%20APT%20Aliases%20-%20http%3A%2F%2Fsavvyadmin.com%2Fuseful-apt-aliases%2F" title="Twitter"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fsavvyadmin.com%2Fuseful-apt-aliases%2F&amp;title=Useful%20APT%20Aliases&amp;notes=If%20you%27re%20an%20avid%20user%20of%20Ubuntu%20or%20other%20Debian%20based%20Linux%20distributions%2C%20then%20you%27re%20probably%20very%20familiar%20with%20using%20APT%20and%20it%27s%20related%20command%20line%20utilities.%20You%20might%20however%20find%20it%20useful%20to%20create%20some%20command%20line%20aliases%20that%20shorten%20t" title="del.icio.us"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://savvyadmin.com/feed/" title="RSS"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fsavvyadmin.com%2Fuseful-apt-aliases%2F&amp;title=Useful%20APT%20Aliases&amp;bodytext=If%20you%27re%20an%20avid%20user%20of%20Ubuntu%20or%20other%20Debian%20based%20Linux%20distributions%2C%20then%20you%27re%20probably%20very%20familiar%20with%20using%20APT%20and%20it%27s%20related%20command%20line%20utilities.%20You%20might%20however%20find%20it%20useful%20to%20create%20some%20command%20line%20aliases%20that%20shorten%20t" title="Digg"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="mailto:?subject=Useful%20APT%20Aliases&amp;body=http%3A%2F%2Fsavvyadmin.com%2Fuseful-apt-aliases%2F" title="email"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fsavvyadmin.com%2Fuseful-apt-aliases%2F&amp;title=Useful%20APT%20Aliases&amp;source=SavvyAdmin.com+For+savvy+admins+everywhere...&amp;summary=If%20you%27re%20an%20avid%20user%20of%20Ubuntu%20or%20other%20Debian%20based%20Linux%20distributions%2C%20then%20you%27re%20probably%20very%20familiar%20with%20using%20APT%20and%20it%27s%20related%20command%20line%20utilities.%20You%20might%20however%20find%20it%20useful%20to%20create%20some%20command%20line%20aliases%20that%20shorten%20t" title="LinkedIn"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fsavvyadmin.com%2Fuseful-apt-aliases%2F" title="Identi.ca"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fsavvyadmin.com%2Fuseful-apt-aliases%2F&amp;title=Useful%20APT%20Aliases&amp;annotation=If%20you%27re%20an%20avid%20user%20of%20Ubuntu%20or%20other%20Debian%20based%20Linux%20distributions%2C%20then%20you%27re%20probably%20very%20familiar%20with%20using%20APT%20and%20it%27s%20related%20command%20line%20utilities.%20You%20might%20however%20find%20it%20useful%20to%20create%20some%20command%20line%20aliases%20that%20shorten%20t" title="Google Bookmarks"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fsavvyadmin.com%2Fuseful-apt-aliases%2F&amp;title=Useful%20APT%20Aliases" title="StumbleUpon"><img src="http://savvyadmin.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://savvyadmin.com/grep-in-color/' rel='bookmark' title='Permanent Link: Grep in Color'>Grep in Color</a></li>
<li><a href='http://savvyadmin.com/download-pgp-keys-with-apt-key/' rel='bookmark' title='Permanent Link: Download PGP Keys with Apt-key'>Download PGP Keys with Apt-key</a></li>
<li><a href='http://savvyadmin.com/backup-and-restore-package-lists-in-ubuntu/' rel='bookmark' title='Permanent Link: Backup and Restore Package Lists in Ubuntu'>Backup and Restore Package Lists in Ubuntu</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://savvyadmin.com/useful-apt-aliases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
