<?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; APT</title>
	<atom:link href="http://savvyadmin.com/tag/apt/feed/" rel="self" type="application/rss+xml" />
	<link>http://savvyadmin.com</link>
	<description>For savvy admins everywhere...</description>
	<lastBuildDate>Fri, 21 Jan 2011 17:53:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</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='Useful APT Aliases'>Useful APT Aliases</a></li>
<li><a href='http://savvyadmin.com/backup-and-restore-package-lists-in-ubuntu/' rel='bookmark' title='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='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>
<p>Related posts:<ol>
<li><a href='http://savvyadmin.com/useful-apt-aliases/' rel='bookmark' title='Useful APT Aliases'>Useful APT Aliases</a></li>
<li><a href='http://savvyadmin.com/backup-and-restore-package-lists-in-ubuntu/' rel='bookmark' title='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='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>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='Grep in Color'>Grep in Color</a></li>
<li><a href='http://savvyadmin.com/download-pgp-keys-with-apt-key/' rel='bookmark' title='Download PGP Keys with Apt-key'>Download PGP Keys with Apt-key</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>
<p>Related posts:<ol>
<li><a href='http://savvyadmin.com/grep-in-color/' rel='bookmark' title='Grep in Color'>Grep in Color</a></li>
<li><a href='http://savvyadmin.com/download-pgp-keys-with-apt-key/' rel='bookmark' title='Download PGP Keys with Apt-key'>Download PGP Keys with Apt-key</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>

