<?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"
	>

<channel>
	<title>Three till Seven &#187; Linux</title>
	<atom:link href="http://www.3till7.net/category/techy/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.3till7.net</link>
	<description>A geek's personal domain.</description>
	<pubDate>Sat, 16 Aug 2008 19:09:44 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>chmodding and Ruby</title>
		<link>http://www.3till7.net/2008/02/01/chmodding-and-ruby/</link>
		<comments>http://www.3till7.net/2008/02/01/chmodding-and-ruby/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 20:52:03 +0000</pubDate>
		<dc:creator>Sarah</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[OS X]]></category>

		<category><![CDATA[Ruby]]></category>

		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.3till7.net/2008/02/01/chmodding-and-ruby/</guid>
		<description><![CDATA[Recently, I switched from a Powerbook to a Macbook, and to copy my files from one to the other, I used a pen drive.  Since my pen drive has a FAT file system, it treats everything as being executable.  This, however, is not the case on a UNIX-like file system like OS X. [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I switched from a Powerbook to a Macbook, and to copy my files from one to the other, I used a pen drive.  Since my pen drive has a FAT file system, it treats everything as being executable.  This, however, is not the case on a UNIX-like file system like OS X.  In order to save myself the hassle of manually chmodding thousands of files, I wrote this Ruby script:</p>
<div class="synthi_code" style="display:block;" id="styled_synthi_48adeef209937">
<h2 class="synthi_header"> Ruby</h2>
<div class="ruby" style="font-family: monospace;"><span style="color:#008000; font-style:italic;">#!/usr/bin/env ruby</span><br />
<span style="color:#CC0066; font-weight:bold;">require</span> 'find'<br />
<span style="color:#CC0066; font-weight:bold;">require</span> 'fileutils'</p>
<p><span style="color:#008000; font-style:italic;"># Append to/remove from this list as necessary</span><br />
Plain = <span style="color:#006600; font-weight:bold;">&#91;</span>'php', 'txt', 'jpg', 'jpeg', 'gif', 'png', 'html', 'pdf', 'css', 'mp3', 'zip', 'tar.<span style="color:#9900CC;">gz</span>', 'tar', 'htm', 'psd', 'ai', 'ptg', 'cgi.<span style="color:#9900CC;">pl</span>', 'sphp', 'svn-base', 'default'<span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">collect</span> <span style="color:#9966CC; font-weight:bold;">do</span> |ext|<br />
&nbsp; &nbsp; <span style="color:#996600;">&quot;.#{ext}&quot;</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span>.<span style="color:#9900CC;">freeze</span></p>
<p><span style="color:#008000; font-style:italic;"># Append to/remove from this list as necessary</span><br />
Executable = <span style="color:#006600; font-weight:bold;">&#91;</span>'pl', 'rb', 'cgi', 'sh'<span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">collect</span> <span style="color:#9966CC; font-weight:bold;">do</span> |ext|<br />
&nbsp; &nbsp; <span style="color:#996600;">&quot;.#{ext}&quot;</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span>.<span style="color:#9900CC;">freeze</span><br />
$num_chmodded = <span style="color:#006666;">0</span></p>
<p><span style="color:#9966CC; font-weight:bold;">def</span> chmod_and_puts<span style="color:#006600; font-weight:bold;">&#40;</span> cmd <span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">puts</span> cmd<br />
&nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">system</span> cmd<br />
&nbsp; &nbsp; $num_chmodded += <span style="color:#006666;">1</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span></p>
<p><span style="color:#9966CC; font-weight:bold;">def</span> chmodder<span style="color:#006600; font-weight:bold;">&#40;</span> start_dir <span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; &nbsp; num_skipped = <span style="color:#006666;">0</span><br />
&nbsp; &nbsp; num_plain = <span style="color:#006666;">0</span><br />
&nbsp; &nbsp; num_executable = <span style="color:#006666;">0</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; Find.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span> start_dir <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> |path|<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">unless</span> File.<span style="color:#9900CC;">symlink</span>?<span style="color:#006600; font-weight:bold;">&#40;</span> path <span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">if</span> FileTest.<span style="color:#9900CC;">file</span>? path<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">if</span> is_plain? path<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; chmod_and_puts <span style="color:#996600;">&quot;chmod 644 <span style="color:#000099;">\&quot;</span>#{path}<span style="color:#000099;">\&quot;</span>&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; num_plain += <span style="color:#006666;">1</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">elsif</span> is_executable? path<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; chmod_and_puts <span style="color:#996600;">&quot;chmod 755 <span style="color:#000099;">\&quot;</span>#{path}<span style="color:#000099;">\&quot;</span>&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; num_executable += <span style="color:#006666;">1</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; num_skipped += <span style="color:#006666;">1</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">elsif</span> File.<span style="color:#9900CC;">directory</span>? path<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; chmod_and_puts <span style="color:#996600;">&quot;chmod 755 <span style="color:#000099;">\&quot;</span>#{path}<span style="color:#000099;">\&quot;</span>&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; num_executable += <span style="color:#006666;">1</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; num_skipped += <span style="color:#006666;">1</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; num_skipped += <span style="color:#006666;">1</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;----------------------------------------------&quot;</span><br />
&nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Chmodded #{$num_chmodded} total:&quot;</span><br />
&nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;<span style="color:#000099;">\t</span>Executable: #{num_executable}&quot;</span><br />
&nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;<span style="color:#000099;">\t</span>Plain: #{num_plain}&quot;</span><br />
&nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Skipped #{num_skipped} files/directories/symlinks&quot;</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span></p>
<p><span style="color:#9966CC; font-weight:bold;">def</span> get_extension<span style="color:#006600; font-weight:bold;">&#40;</span> path <span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; &nbsp; File.<span style="color:#9900CC;">extname</span><span style="color:#006600; font-weight:bold;">&#40;</span> path <span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">downcase</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span></p>
<p><span style="color:#9966CC; font-weight:bold;">def</span> is_executable?<span style="color:#006600; font-weight:bold;">&#40;</span> path <span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; &nbsp; extension = get_extension<span style="color:#006600; font-weight:bold;">&#40;</span> path <span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">if</span> Executable.<span style="color:#9966CC; font-weight:bold;">include</span>? extension<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF; font-weight:bold;">true</span><br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF; font-weight:bold;">false</span><br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span></p>
<p><span style="color:#9966CC; font-weight:bold;">def</span> is_plain?<span style="color:#006600; font-weight:bold;">&#40;</span> path <span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; &nbsp; extension = get_extension<span style="color:#006600; font-weight:bold;">&#40;</span> path <span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">if</span> Plain.<span style="color:#9966CC; font-weight:bold;">include</span>? extension<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF; font-weight:bold;">true</span><br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF; font-weight:bold;">false</span><br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span></p>
<p>chmodder<span style="color:#006600; font-weight:bold;">&#40;</span> '.' <span style="color:#006600; font-weight:bold;">&#41;</span></div>
</div>
<p>This goes through all the files and directories within the directory from which you run the script and chmods non-executable files to 644 (read+write on User, read on Group and Other) and executable files to 755 (read+write+execute on User, read+execute on Group and Other).  If you're unfamiliar with the chmod command, you might want to read my <a href="/2005/12/21/beginning-linux-guide/">beginning Linux guide</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.3till7.net/2008/02/01/chmodding-and-ruby/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Grub Error 17</title>
		<link>http://www.3till7.net/2007/10/25/grub-error-17/</link>
		<comments>http://www.3till7.net/2007/10/25/grub-error-17/#comments</comments>
		<pubDate>Fri, 26 Oct 2007 00:24:15 +0000</pubDate>
		<dc:creator>Sarah</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[list]]></category>

		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://www.3till7.net/2007/10/25/grub-error-17/</guid>
		<description><![CDATA[I just had an interesting time with trying to boot into Linux on my PC.  Last night, I noticed my /boot/grub/menu.lst file had gotten overwritten when I performed some Ubuntu updates.  This meant I had to add in configuration to allow Windows to boot, and since I didn&#8217;t have a backup of my [...]]]></description>
			<content:encoded><![CDATA[<p>I just had an interesting time with trying to boot into Linux on my PC.  Last night, I noticed my /boot/grub/menu.lst file had gotten overwritten when I performed some Ubuntu updates.  This meant I had to add in configuration to allow Windows to boot, and since I didn&#8217;t have a backup of my old, working configuration (mistake number 1) I looked online.  I found something that worked and ignored the use of Grub&#8217;s &#8216;hide&#8217; and &#8216;unhide&#8217; commands (mistake number 2) that were in the configuration.  I rebooted and successfully got into Windows.</p>
<p>When I tried to boot Windows tonight, it wouldn&#8217;t work.  In fact, the Grub boot menu wouldn&#8217;t even come up, so I couldn&#8217;t get into Linux either.  It just said &#8216;Error 17&#8242; and sat there.  After digging around online, I found a message in some forum archives that explained the problem, and I&#8217;m repeating it here because it&#8217;s kind of obscure and this might help someone else in the future:  do <em>not</em> use Grub&#8217;s &#8216;hide&#8217; command on Linux partitions, because it sets their filesystem type to &#8216;93&#8242; instead of &#8216;83&#8242;.  &#8216;93&#8242; = the Amoeba operating system, &#8216;83&#8242; = Linux.  Thus when you try to boot Linux, or when Grub is on your Linux partition and thus is trying to read from a Linux partition, Grub thinks it&#8217;s working with Amoeba and thus fails out because it&#8217;s actually Linux.</p>
<p>How to fix this:</p>
<ul class="padded">
<li>Using a live CD (I recommend <a href="http://damnsmalllinux.org/">Damn Small Linux</a> because it&#8217;s great for quick fixes), you can edit your Linux partition.  Download the live CD image (hopefully you have access to another computer with a disc burner) and burn it.</li>
<li>Boot your messed-up computer with the live CD and open a terminal when it&#8217;s booted.</li>
<li>You need to know which partition is your Linux partition.  In the terminal, do the command <code>fdisk -l</code>.  If that doesn&#8217;t work, you might try <code>sudo fdisk -l</code> to act as the root superuser in order to use the Fdisk tool.  You&#8217;re looking for, haha, a partition that claims to be &#8216;Amoeba&#8217;.  You want the information that looks like &#8216;/dev/hda1&#8242;.</li>
<li>Once you know where the lying partition is, do <code>fdisk /dev/hda</code> (or <code>sudo fdisk /dev/hda</code>) if your Linux was on /dev/hda1.  You need to leave off the number at the end, so if your Linux was on /dev/hdb2, you would issue the command <code>fdisk /dev/hdb</code>.  This will allow you to work with that drive.</li>
<li>All we need to do is change the partition&#8217;s type from 93 to 83 so that it knows it&#8217;s Linux again.  Fdisk&#8217;s commands are all one character long.  You can use <code>m</code> to get a command list if you need it.  I would recommend issuing the command <code>p</code> to list the partition table, so you can better see what you&#8217;re doing.</li>
<li>Now you can use the <code>t</code> command to tell Fdisk you want to adjust the type of one of the partitions.  It will ask you which partition you want to edit, and you should give it a number.  My Linux partition is /dev/hda1, so I entered 1.</li>
<li>Now Fdisk will ask for a hex code.  Here is where you need to enter 83 to represent a Linux device.  If you&#8217;re unsure about this, you can type <code>L</code> to list all the operating system types it recognizes and their codes.</li>
<li>Once you&#8217;ve entered the hex type number, you&#8217;ll be returned to Fdisk&#8217;s command prompt.  You should issue the command <code>w</code> to write the partition table and exit.</li>
</ul>
<p>That&#8217;s it!  That should tell the Linux partition that it is indeed Linux and not Amoeba, so next time you reboot, things should work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.3till7.net/2007/10/25/grub-error-17/feed/</wfw:commentRss>
		</item>
		<item>
		<title>how to reformat your pen drive</title>
		<link>http://www.3till7.net/2007/04/19/how-to-reformat-your-pen-drive/</link>
		<comments>http://www.3till7.net/2007/04/19/how-to-reformat-your-pen-drive/#comments</comments>
		<pubDate>Thu, 19 Apr 2007 13:12:20 +0000</pubDate>
		<dc:creator>Sarah</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://www.3till7.net/2007/04/19/how-to-reformat-your-pen-drive/</guid>
		<description><![CDATA[USB pen drives are everywhere these days, and for good reason, since they&#8217;re dead useful.  I use mine with my Linux box, my Powerbook, and various other systems I&#8217;ve had cause to stick it in.  After a while, my 1 GB drive was only holding a few hundred MB.  When I would [...]]]></description>
			<content:encoded><![CDATA[<p>USB pen drives are everywhere these days, and for good reason, since they&#8217;re dead useful.  I use mine with my Linux box, my Powerbook, and various other systems I&#8217;ve had cause to stick it in.  After a while, my 1 GB drive was only holding a few hundred MB.  When I would do an <code>ls -a</code> on it, I would see several hidden directories, such as .Trashes and .Trash-sarah.  Trying to <code>sudo rm -rf .Trash*</code> would fail out, however, giving complaints of a read-only filesystem.  If you&#8217;re having such problems, or just really want to make sure your drive is clean, you can reformat it easily in Linux.  I reformatted mine using Ubuntu, so the instructions have a slight bias; your mileage may vary.  <em>Warning:</em> reformatting your pen drive will delete all its contents.</p>
<ol class="padded">
<li>Insert your USB drive and let it do its automount thing.</li>
<li>In a terminal, do <code>sudo fdisk -l</code> to list your partitions.  A list of your partitions will spit out, and your pen drive will probably be in a section like this:<br />
<blockquote style="overflow: auto;"><pre>   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         992      999813+   6  FAT16</pre>
</blockquote>
<p>Your pen drive will not necessarily be located at /dev/sda1; if it isn&#8217;t, you&#8217;ll need to adjust later instructions to point to its location.  Be <em>sure</em> you&#8217;re working with the right device, because if you use fdisk to delete partitions on, say, your main hard drive, you will <em>delete your hard drive&#8217;s contents</em>.</li>
<li>Do <code>sudo umount /dev/sda1</code> (or whatever the location of your pen drive is) to unmount your pen drive so that you can work with its partitions.</li>
<li>Do <code>sudo fdisk /dev/sda1</code> to use fdisk to adjust your pen drive&#8217;s partitions.</li>
<li>You&#8217;ll now be within fdisk.  When my drive was scrambled, I was able to type <code>p</code> to show the existing partition and <code>d</code> to delete it.  Running through this tutorial to make sure it made sense, I had to type <code>p</code> to show the partition table, <code>a</code> to make a partition active, <code>1</code> to choose the first partition, and <code>d</code> to delete it.  If your situation is like mine, you&#8217;ll be asked to choose between several partitions; start from 1 and work through them all.  Fdisk complained about the partition not starting in the right spot until I got all the pen drive&#8217;s partitions deleted.</li>
<li>Type <code>n</code> to create a new partition.</li>
<li>Choose <code>p</code> to make it a primary partition.</li>
<li>Type <code>1</code> to make this the first partition.</li>
<li>Hit enter to choose the suggested first cylinder.</li>
<li>Hit enter to choose the suggested last cylinder.  This will make the partition take up the maximum space on your pen drive.</li>
<li>Type <code>a</code> to make this partition active.</li>
<li>Choose <code>1</code> to select making the first partition active.</li>
<li>Type <code>t</code> to change this partition&#8217;s file system type.</li>
<li>Type <code>6</code> to choose the FAT16 file system.</li>
<li>Type <code>w</code> to write this new partition table.</li>
<li>You will be dumped back out to your terminal.  Type <code>sudo mkfs.vfat -F 16 -n USB /dev/sda1</code> to format the first partition.</li>
</ol>
<p>You can now remove and reinsert your USB drive because you&#8217;re done!  Try going to its mount location (/media/usbdisk on my machine) and doing <code>ls -la</code>.  You should see something like the following:</p>
<blockquote style="overflow: auto;"><pre>total 8
drwxr-xr-x 2 root root 4096 2007-04-18 18:18 .
drwxr-xr-x 6 root root 4096 2007-04-19 08:45 ..
-rw------- 1 root root    0 2007-04-18 18:18 .created_by_pmount</pre>
</blockquote>
<p>Other than that, your pen drive should be empty and ready for use.  :)  Thanks to <a href="http://www.pendrivelinux.com/2007/01/25/usb-x-ubuntu-610">Pendrivelinux.com</a> for helping me reformat my drive initially through a tutorial for how to install Ubuntu on your pen drive.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.3till7.net/2007/04/19/how-to-reformat-your-pen-drive/feed/</wfw:commentRss>
		</item>
		<item>
		<title>the ease of Linux with a focus on Ubuntu</title>
		<link>http://www.3till7.net/2007/04/05/the-ease-of-linux-with-a-focus-on-ubuntu/</link>
		<comments>http://www.3till7.net/2007/04/05/the-ease-of-linux-with-a-focus-on-ubuntu/#comments</comments>
		<pubDate>Thu, 05 Apr 2007 15:08:39 +0000</pubDate>
		<dc:creator>Sarah</dc:creator>
		
		<category><![CDATA[3till7.net]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[newbie]]></category>

		<guid isPermaLink="false">http://www.3till7.net/2007/04/05/the-ease-of-linux-with-a-focus-on-ubuntu/</guid>
		<description><![CDATA[3till7.net had some excitement yesterday because a post from 2005 got Dugg, and is also garnering a lot of hits from StumbleUpon.  I find this funny because it&#8217;s such an old post but also because the content is just an email my dad sent me about how all these different companies use Linux.  [...]]]></description>
			<content:encoded><![CDATA[<p>3till7.net had some excitement yesterday because <a href="/2005/11/01/everyone-uses-linux/">a post from 2005</a> got <a href="http://digg.com/linux_unix/Everyone_Uses_Linux">Dugg</a>, and is also garnering a lot of hits from <a href="http://www.stumbleupon.com/">StumbleUpon</a>.  I find this funny because it&#8217;s such an old post but also because the content is just an email <a href="http://edge-op.org/">my dad</a> sent me about how all these different companies use Linux.  I sent him an email saying I should post more of his emails on my site.  ;)</p>
<p>The commentary on both that post and Digg, though, has prompted me to write an article about Linux for people other than big businesses.  It was the case, back in the day, that Linux was for the hacker elite, but those days are long gone.  Now, you can pop in a <a href="http://en.wikipedia.org/wiki/Live_cd">live CD</a> and you&#8217;re off.  Most live CD&#8217;s offer an install option, so if you like browsing around the OS, double-click an icon on the desktop and it&#8217;ll install to your hard drive.  When I got my new computer, to install <a href="http://www.ubuntu.com/">Ubuntu</a>, I just popped in the CD, let it boot, and chose the install option.  I then sat back as it did everything for me.  Oh, it asked me a few questions, such as my name, where I was located, etc., but those aren&#8217;t exactly questions that computer newbies would have trouble with.  The whole thing was easy; I watched TV while I was doing it and just glanced over every now and then to see its progress.  It rebooted when it finished and I was presented with a login screen.  I typed the user name and password I&#8217;d chosen, and boom!  I had a pretty desktop with very normal looking menus.  If someone is used to Windows, they&#8217;re going to feel pretty comfortable with a distribution such as Ubuntu because the layout is easy to work with.</p>
<p>Ubuntu is the distribution I recommend to Linux newbies, too.  It&#8217;s easy to install and it&#8217;s easy to maintain.  When there are updates to the system, you see a little orange symbol in the taskbar and it pops up a little message telling you 1) that there are updates and 2) to click the orange symbol to install them.  It&#8217;s as easy as that.  As for applications in Linux, there is usually an alternative available; see <a href="http://www.linuxeq.com/">The Linux Equivalent Project</a> for a big list of Windows applications and several Linux alternatives.</p>
<p>Installing software in Ubuntu is also typically easy because it&#8217;s a <a href="http://www.debian.org/">Debian</a> derivative, and one fantastic feature of Debian is <a href="http://en.wikipedia.org/wiki/Apt-get">apt-get</a>:</p>
<blockquote><p>Advanced Packaging Tool, or APT, is a package management system used by Debian GNU/Linux and its derivatives. APT simplifies the process of managing software on Unix-like operating systems, by automating the retrieval, configuration and installation of software packages, either from binary files or by compiling source code.</p></blockquote>
<p>&#8211; <a href="http://en.wikipedia.org/wiki/Apt-get">Wikipedia</a></p>
<p>Apt-get does not have a <abbr title="graphical user interface">GUI</abbr>, which may be intimidating for those new to Linux.  Fortunately, there&#8217;s <a href="http://www.nongnu.org/synaptic/">Synaptic</a>, which is a GUI frontend to apt-get.  You open up Synaptic, search for the application or functionality you&#8217;re looking for, and it shows a list of possible applications.  Choose the one you want and click a button to install it.  Some people who tried Linux several years ago, or who tried a distribution without apt-get, will cite the difficulty of installing applications as a drawback to Linux.  With a Debian derivative, that&#8217;s not a concern.  If you&#8217;re installing a <a href="http://en.wikipedia.org/wiki/Tarball">tarball</a> or an <a href="http://en.wikipedia.org/wiki/RPM_Package_Manager">RPM</a>, you might have to go out and download dependencies for whatever you&#8217;re trying to install.  With apt-get, you don&#8217;t have that worry because it calculates the dependencies, gets them, and installs them for you.  It&#8217;s smart about it, too, installing the dependencies before installing your desired package.</p>
<p>Despite the simplicity I&#8217;ve been talking about, I still hear from people that Linux is not meant for total newbs, Joe Sixpacks, average people with no computer know-how.  I call shenanigans.</p>
<ul class="padded">
<li><em>My mom</em> - Mom is not a computer person, she&#8217;s a plant person.  She&#8217;d love nothing more than to spend all her free time repotting plants in her greenhouse.  However, since getting internet access years ago, she has discovered the world of online plant trading.  My dad maintains the computers in their house and, rather than deal with the continuous <a href="http://en.wikipedia.org/wiki/Bsod">BSODs</a>, viruses, crashes, and random, undecipherable Windows errors, he just installed Debian on my mom&#8217;s machine.  She doesn&#8217;t have to deal with any of that crap now.  She just clicks her little Firefox icon to surf plant web sites or her Thunderbird icon to check her mail.  This is an example of the usability of Linux for one particular &#8220;Joe Sixpack,&#8221; after Linux has been set up for said user.</li>
<li><em>My dormmates</em> - Back when I lived in the dorm, there were occasionally issues with the residential internet service.  Usually they affected everyone regardless of their operating system, but on one occasion, I was doing fine on my Linux box when my roommate on her XP system couldn&#8217;t get anything to load.  I thought it was an isolated issue before our neighbors came asking if we were having internet troubles.  I had a few live CD&#8217;s laying around because I enjoy trying out different distributions from time to time.  I don&#8217;t remember if they were <a href="http://kororaa.org/">Kororaa</a>, Ubuntu, <a href="http://www.knoppix.org/">Knoppix</a>, or a mixture of all three.  Nevertheless, I distributed them to the other girls with an explanation to pop them in their CD drive, that it wouldn&#8217;t overwrite any of their stuff, but that they would be able to get online with them.  I went with one of the girls, Tiffany, to ensure things worked out.  She stuck it in her laptop, booted the disc, and got Firefox up and running.  Most live CD&#8217;s are set up to work with dang near any configuration, so it automatically recognized the internet connection and she was online without any hassle.  I introduced her to <a href="http://gaim.sourceforge.net/">Gaim</a> so that she could log on to AIM or MSN or whatever and talk to people.  I left her with the instructions to reboot and pop the CD out when she was done.  A few days later, she brought it back to me, grateful and with her Windows install on her laptop unharmed.</li>
</ul>
<p>It is also often said to me that getting &#8220;basic&#8221; features installed in Linux, such as Flash or MP3 support, is difficult.  This is another area where Ubuntu shines, in my opinion:  if you do a Google search for &#8220;ubuntu <em>MY PROBLEM</em>&#8220;, you&#8217;re probably going to find a solution somewhere on the <a href="http://ubuntuforums.org/">Ubuntu Forums</a> or elsewhere on the web.  Searching for specific problems for other distributions, or for just Linux in general, often lead to good results, too.  I&#8217;m citing Ubuntu here because I&#8217;m more familiar with it and because it&#8217;s known for its very friendly user base.  There are sites such as <a href="http://ubuntuguide.org/">Ubuntu Guide</a> for how to install pretty much anything, such as <a href="http://ubuntuguide.org/wiki/Ubuntu_Edgy#How_to_install_Automatix2_on_Ubuntu.2C_Kubuntu.2C_and_Xubuntu">Automatix2</a>, which will let you install things like Flash with one click in a nice <abbr title="graphical user interface">GUI</abbr>.  For MP3 support and other restricted formats, Ubuntu has a particular <a href="https://help.ubuntu.com/community/RestrictedFormats">help page</a> addressing that topic.</p>
<p>Even though such things are easy to install, it&#8217;s still raised as a complaint that they require installation at all.  &#8220;Why doesn&#8217;t Linux just come with these things?  They&#8217;re on my Windows machine by default.&#8221;  To understand this, you have to understand some of the history and reasoning behind Linux and open source software in general.  There are different ideals for Linux than there are for Windows; it&#8217;s a whole different beast.</p>
<blockquote><p>Patent and copyright restrictions complicate free operating systems distributing software to support proprietary formats. &#8230; Ubuntu&#8217;s commitment to only include completely free software by default means that proprietary media formats are not configured &#8216;out of the box&#8217;. &#8230; If this seems like unnecessary work, remember that Ubuntu is limited by patents and license restrictions in some countries, which make it illegal for Ubuntu to include them.</p></blockquote>
<p>&#8211; <a href="https://help.ubuntu.com/community/RestrictedFormats">Ubuntu RestrictedFormats page</a></p>
<p>See also <a href="http://www.gnu.org/philosophy/">Philosophy of the GNU Project</a>.</p>
<p>The bottom line is that Linux is really not that hard, even for non-geeks.  I think a lot of the reports that it&#8217;s hard come from the following issues:</p>
<ul class="padded">
<li><em>It&#8217;s different from Windows.</em>  It has a different ideology from Windows and that shapes how things are in the Linux world.  It&#8217;s all up in that &#8220;open source&#8221; stuff, a lot of distributions don&#8217;t include things like support for the MP3 format, and people just don&#8217;t get why that is at first.</li>
<li><em>People have had bad experiences in the past.</em>  I have a cousin that&#8217;s an electrical engineer; he programs embedded systems all day in C.  This guy is most definitely a computer geek.  However, his first experiences with Linux were back in the 90&#8217;s with RedHat.  He experienced firsthand RPM <a href="http://en.wikipedia.org/wiki/Dependency_hell">dependency hell</a>, as well as a young and green Linux.  For years he refused to try Linux again, sticking instead to familiar Windows.  He eventually gave it another shot with <a href="http://www.mepis.org/">Mepis</a> and hasn&#8217;t gone back since.  He and his wife, who isn&#8217;t a computer geek, happily use Linux exclusively on their home machine.  Mepis worked with his wireless configuration, <a href="http://www.kde.org/">KDE</a> suits him, and Linux is no longer a confusing hassle&#8211;it just works.</li>
<li><em>Outdated information is spread.</em>  Yeah, Linux was not as sleek and user-friendly several years ago as it is today, but then again, what was?  How pretty was Windows 95 in comparison with Vista?  Remember the brick-like phones that Nokia used to sell, and how everyone had one?  How about those old web sites with the flashing GIF images, frames, and lack of CSS?  The point is, technology just gets prettier and better over time, and Linux is no exception.  If you&#8217;re talking to someone who tried Linux a few years ago and getting a bad impression, you&#8217;re not getting an accurate reflection of how things would be for you, were you to try it today.</li>
<li><em>You&#8217;re told it won&#8217;t work with your particular machine.</em>  Now that&#8217;s just crazy talk.  Linux works with some of the most obscure hardware out there, often out-of-the-box.  Support is continually being developed for hardware, too.  When the next hot device comes out, you can bet there&#8217;s going to be a Linux solution for it.  Linux worked on my old machine with its K6-2 500 MHz processor and on my new machine with its AMD Athlon 64 X2 3800+ processor.  It worked on Todd&#8217;s Powerbook, dual booting with OS X.  It works on an old 386 at my parents&#8217; house.  It works on my <a href="http://www.myzaurus.com/">Sharp Zaurus</a>.  See <a href="http://www.linux-drivers.org/">Linux Drivers</a>.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.3till7.net/2007/04/05/the-ease-of-linux-with-a-focus-on-ubuntu/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ad blocking through /etc/hosts</title>
		<link>http://www.3till7.net/2006/03/04/ad-blocking-through-etchosts/</link>
		<comments>http://www.3till7.net/2006/03/04/ad-blocking-through-etchosts/#comments</comments>
		<pubDate>Sat, 04 Mar 2006 20:39:00 +0000</pubDate>
		<dc:creator>Sarah</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.3till7.net/2006/03/04/ad-blocking-through-etchosts/</guid>
		<description><![CDATA[There are several ad sites that you&#8217;ll see being used everywhere.  They slow down page loading, even on fast connections, because sometimes there&#8217;ll be lag and they won&#8217;t load immediately and instead of being able to read that interesting news article, you&#8217;re stuck waiting for some Flash animation to show up so you can [...]]]></description>
			<content:encoded><![CDATA[<p>There are several ad sites that you&#8217;ll see being used everywhere.  They slow down page loading, even on fast connections, because sometimes there&#8217;ll be lag and they won&#8217;t load immediately and instead of being able to read that interesting news article, you&#8217;re stuck waiting for some Flash animation to show up so you can ignore it.  A simple way to make those ads 1) not show up and 2) not cause delays in page loading is to edit /etc/hosts.    Check out <a href="http://hostsfile.mine.nu/">hostsfile.mine.nu</a> for ways of doing this in Windows and Mac.<br />
<!--mizore--><br />
Here&#8217;s an example /etc/hosts file:</p>
<blockquote><pre>127.0.0.1       localhost

# The following lines are desirable for IPv6 capable hosts
# (added automatically by netbase upgrade)

::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts</pre>
</blockquote>
<p>We&#8217;re not interested in anything after the first line, really, because that first line is the key to our trick.  What it&#8217;s doing is associating a host name (e.g. <em>localhost</em>) with an IP address (e.g. <em>127.0.0.1</em>).  What we&#8217;re going to do is assign some common ad host names to IP addresses beginning with <em>127.0.0</em>, and ending with some number.  The idea here is to point the host name, in our case some ad site, to an IP address that goes right back to localhost.  This will cause the ad to load immediately because it&#8217;ll be looking on your local system, but since you&#8217;re not going to have <em>/adi/N3271.RealCities/B1808805.8;sz=300&#215;250;click=&#8230;</em> on your computer, the ad will just show up with a &#8216;Not Found&#8217; message:</p>
<p><img src="/wp-images/etc_hosts_ad_block.png" alt="Example of blocked ad" width="422" height="291" /></p>
<p>So as root, edit /etc/hosts with your favorite editor and add the following lines:</p>
<blockquote><pre>127.0.0.2 ad.doubleclick.net
127.0.0.3 servedby.advertising.com
127.0.0.4 ad.uk.doubleclick.net
127.0.0.5 ad.au.doubleclick.net
127.0.0.6 z1.adserver.com
127.0.0.7 red.as-eu.falkag.net
127.0.0.8 f.as-eu.falkag.net
127.0.0.9 data.as-eu.falkag.net
127.0.0.10 ads.guardianunlimited.co.uk
127.0.0.11 ads.guardian.co.uk
127.0.0.12 a.as-eu.falkag.net
127.0.0.13 as1.falkag.de
127.0.0.14 code.fastclick.net
127.0.0.15 adfarm.mediaplex.com
127.0.0.16 smarttargetting.co.uk
127.0.0.17 data.coremetrics.com</pre>
</blockquote>
<p>Now any site that tries to load an ad hosted on one of those sites will instead display a message akin to the one in the screenshot above.  If you find any other sites that host ads that you don&#8217;t want to see, just add another line to /etc/hosts.</p>
<p>Thanks to <a href="http://edge-op.org/">my dad</a> for showing me this trick.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.3till7.net/2006/03/04/ad-blocking-through-etchosts/feed/</wfw:commentRss>
		</item>
		<item>
		<title>non-English characters in Linux</title>
		<link>http://www.3till7.net/2005/12/28/non-english-characters-in-linux/</link>
		<comments>http://www.3till7.net/2005/12/28/non-english-characters-in-linux/#comments</comments>
		<pubDate>Thu, 29 Dec 2005 02:26:48 +0000</pubDate>
		<dc:creator>Sarah</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://www.3till7.net/2005/12/28/non-english-characters-in-linux/</guid>
		<description><![CDATA[It&#8217;s easy to make accented characters (e.g. &#233; and &#252;) in Linux.  Easier than in Windows, actually, because in Windows you have to remember all those crazy Alt codes, and in Linux, it&#8217;s logical.


You need a command-line program called xmodmap.  If you&#8217;re not sure you have this, run the following command in a [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s easy to make accented characters (e.g. &eacute; and &uuml;) in Linux.  Easier than in Windows, actually, because in Windows you have to remember all those crazy Alt codes, and in Linux, it&#8217;s logical.<br />
<!--mizore--></p>
<ol class="padded">
<li>You need a command-line program called <code>xmodmap</code>.  If you&#8217;re not sure you have this, run the following command in a term/console:  <code>which xmodmap</code>.  You&#8217;ll probably get something like the following:<br />
<code>sarah@imp:~$ which xmodmap</code><br />
<code>/usr/bin/X11/xmodmap</code><br />
This shows that you have <code>xmodmap</code> installed, and it happens to be located at /usr/bin/X11/xmodmap.  Peachy.</li>
<li>Run the following command in a term:<br />
<code>xmodmap -e "keysym Alt_R = Multi_key"</code><br />
This assigns your right Alt to be your &#8220;multi-key.&#8221;  Your multi-key is the key you&#8217;ll press to tell the computer you&#8217;re about to make an accented character.</li>
<li>Now you&#8217;re all set!  The basic idea is to hit a key sequence, beginning with your multi-key, and then two characters you wish to combine.  For example, to make an &eacute;, you would hit <em>Alt &#39; e</em>.  That&#8217;s right-Alt, release, apostrophe, release, e.  Or, you can hold down all the keys at once (i.e. right-Alt + apostrophe + e).  You can also produce &eacute; if you hit the e before the apostrophe, as long as you begin the sequence with your multi-key.
<p>Note that your term might not recognize the accented characters, and so you should probably do your testing in some place like a browser or text editor.</li>
</ol>
<p>Voilà.  Now you can type your French papers much more quickly, because you won&#8217;t have to select individual characters from some symbol chart in your word processor, and you can correspond with your German friends on <a href="http://gaim.sourceforge.net/">gaim</a> just as quickly, because you won&#8217;t have to copy and paste accented characters from some site.</p>
<p>A note:  if you like writing your documents in <a href="http://www.openoffice.org/">OpenOffice</a>, you may have some trouble with entering accented characters because OpenOffice always seemed to ignore the Alt key sequences, at least for me with version 1.1.0.  I recommend instead, if you&#8217;re going to be writing something that involves non-English characters, a word processor called <a href="http://www.abisource.com/">AbiWord</a>.  It&#8217;s simpler than OpenOffice and it lets you type in the accented characters.</p>
<h2>Sample Key Combinations</h2>
<p>For these sample sequences, I assume that your multi-key is Alt.</p>
<table>
<tr>
<th>Combination</th>
<th>Result</th>
</tr>
<tr>
<td>Alt s s</td>
<td>ß</td>
</tr>
<tr>
<td>Alt ? ?</td>
<td>&iquest;</td>
</tr>
<tr>
<td>Alt ! !</td>
<td>&iexcl;</td>
</tr>
<tr>
<td>Alt ` o (that&#8217;s a back tick)</td>
<td>ò</td>
</tr>
<tr>
<td>Alt ^ a</td>
<td>â</td>
</tr>
<tr>
<td>Alt &quot; u (those are quotes, not two apostrophes)</td>
<td>ü</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.3till7.net/2005/12/28/non-english-characters-in-linux/feed/</wfw:commentRss>
		</item>
		<item>
		<title>extracting audio from a DVD</title>
		<link>http://www.3till7.net/2005/12/24/extracting-audio-from-a-dvd/</link>
		<comments>http://www.3till7.net/2005/12/24/extracting-audio-from-a-dvd/#comments</comments>
		<pubDate>Sat, 24 Dec 2005 22:49:02 +0000</pubDate>
		<dc:creator>Sarah</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.3till7.net/?p=1016</guid>
		<description><![CDATA[It&#8217;s pretty easy to extract just the audio from a DVD in Linux, using Mplayer, sox, and either Audacity or split.


First you need to get the audio from the DVD into a WAV file:
mplayer -vo null -ao pcm -aofile FILE_TO_CREATE.wav dvd://
This step will take a while.
Next you need to convert that huge WAV file (around [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s pretty easy to extract just the audio from a DVD in Linux, using Mplayer, sox, and either Audacity or split.<br />
<!--mizore--></p>
<ol class="padded">
<li>First you need to get the audio from the DVD into a WAV file:<br />
<code>mplayer -vo null -ao pcm -aofile FILE_TO_CREATE.wav dvd://</code><br />
This step will take a while.</li>
<li>Next you need to convert that huge WAV file (around 1Gb for 1.5 hours) into a format that&#8217;s more compact.  I prefer OGG myself:<br />
<code>sox -t wav THE_WAV_FILE.wav -t ogg FILE_TO_CREATE.ogg</code><br />
This step will also take a while.</li>
<li>Now all that&#8217;s left is breaking that long .ogg file into separate songs.  I recommend <a href="http://audacity.sourceforge.net/">Audacity</a> for this, as it has a GUI and has some useful features, such as being able to amplify sounds that are too soft.  However, you can also use the command-line tool split, as follows:<br />
<code>split -b SIZE THE_OGG_FILE.ogg NAME_TO_BEGIN_EACH_CHUNK_WITH</code></p>
<p>This method is much less convenient as it only breaks your .ogg into separate files of size SIZE, ignoring the content.  With Audacity, you can use your mouse to select sections and then export them to their own file.</li>
</ol>
<p>I&#8217;m using Mplayer 1.0pre5-3.3.4, Audacity 1.2.3, sox 12.17.7, and split 5.2.1.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.3till7.net/2005/12/24/extracting-audio-from-a-dvd/feed/</wfw:commentRss>
		</item>
		<item>
		<title>beginning Linux guide</title>
		<link>http://www.3till7.net/2005/12/21/beginning-linux-guide/</link>
		<comments>http://www.3till7.net/2005/12/21/beginning-linux-guide/#comments</comments>
		<pubDate>Wed, 21 Dec 2005 18:17:36 +0000</pubDate>
		<dc:creator>Sarah</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.3till7.net/?p=1009</guid>
		<description><![CDATA[This was taken from an email I sent to Jem and Trinity about beginning in Ubuntu Linux.  It might also be useful to see my dated Beginning Linux Commands guide.  Any questions about something I do or don&#8217;t have on here, as well as your own Linux tips, can be posted as comments.

Note: [...]]]></description>
			<content:encoded><![CDATA[<p>This was taken from an email I sent to <a href="http://www.jemjabella.co.uk/">Jem</a> and <a href="http://www.versteckt-sein.net/">Trinity</a> about beginning in <a href="http://www.ubuntulinux.org/">Ubuntu Linux</a>.  It might also be useful to see my dated <a href="/2004/07/05/beginning-linux-commands/">Beginning Linux Commands</a> guide.  Any questions about something I do or don&#8217;t have on here, as well as your own Linux tips, can be posted as comments.<br />
<!--mizore--><br />
<em>Note:</em>  Don&#8217;t look on this guide as though you <em>have</em> to learn all this stuff right now in order to be able to use Linux.  No.  You can get around otherwise, enjoying Linux and getting work done at the same time without messing around with the command-line, which is what a lot of this guide deals with.  Look over this guide and then pick and choose what you need.  Want to learn how to change file permissions?  Check out the section on the <code>chmod</code> command.  Want to know what program to use for a certain task?  Check out that section.  You don&#8217;t have to memorize all this stuff to get around, but it&#8217;s there if you need it.</p>
<h2 class="space_above">Useful Links</h2>
<ul class="padded">
<li><a href="http://www.edge-op.org/grouch/">The &#8220;Linux related&#8221; section has some good articles.</a></li>
<li><a href="http://www.edge-op.org/links1.html#general">Linux help (and other) links.</a></li>
<li><a href="http://www.edge-op.org/grouch/notes.html">&#8220;Notes and tips for beginning in Linux&#8221;</a></li>
</ul>
<h2 class="space_above">Command-Line Interface Beginning Commands</h2>
<p>The table was a little wide so I put it in <a href="/wp-content/command_line_interface_beginning_commands.html">its own separate file</a>.</p>
<h2 class="space_above">Debian (or Debian derivative) Commands</h2>
<ul class="padded">
<li><code>apt-cache search SOMETHING</code> - Search the Debian archives for SOMETHING.</li>
<li><code>apt-cache show PACKAGE</code> - Show info about PACKAGE, such as its name, size, description, dependencies, etc.</li>
<li><code>apt-get install PACKAGE</code> - Install all the dependencies for PACKAGE and PACKAGE itself.</li>
<li><code>apt-get update</code> - Run before dist-upgrade-ing.</li>
<li><code>apt-get dist-upgrade</code> - Upgrade all out-of-date programs on the system.</li>
</ul>
<h2 class="space_above">Installing TrueType Fonts</h2>
</li>
<ul>
<li>Copy your new font(s) into <code>/usr/share/fonts/truetype</code></li>
<li>Run <code>ttmkfdir</code></li>
<li>Restart Gimp (or whichever program you wish to use them in.)
</ul>
<h2 class="space_above">Chmod Tutorial</h2>
<table>
<tr>
<th>U</th>
<th>G</th>
<th>O</th>
</tr>
<tr>
<td>rwx</td>
<td>rwx</td>
<td>rwx</td>
</tr>
<tr>
<td>421</td>
<td>421</td>
<td>421</td>
</tr>
</table>
<table>
<tr>
<td>read = 4</td>
<td>U = user</td>
</tr>
<tr>
<td>write = 2</td>
<td>G = group</td>
</tr>
<tr>
<td>execute = 1</td>
<td>O = other</td>
</tr>
</table>
<p>-rwxrwxrwx<br />
-rw-rw-rw-<br />
-rwxr&#8211;r&#8211;<br />
etc.</p>
<p>You add up the permissions you want and stick them in the slot you want.  If you want the user to be able to read and write to a file, that&#8217;s 4 (read) + 2 (write) = 6 (e.g. <code>chmod 644 harry.html</code>).  This was the way I learned, but there&#8217;s also a simpler way.  <code>person+permission</code> to add a permission (e.g. <code>chmod g+x jim.sh</code>) or <code>person-permission</code> to remove a permission (e.g. <code>chmod o-w yellow.txt</code>).</p>
<h2 class="space_above">Programs I Recommend for a Given Task</h2>
<ul class="padded">
<li>Music player - amaroK</li>
<li>Browser - Firefox</li>
<li>HTML editor - vim or Bluefish</li>
<li>Graphics editor - The GIMP</li>
<li>Office suite - OpenOffice</li>
<li>Mail - Thunderbird</li>
<li>Instant messenger - gaim (supports AIM, Yahoo!, ICQ, Jabber, etc.)</li>
<li>CD ripper - Sound Juicer, grip, or ripperx</li>
<li>Card game - Pysol (has freakin&#8217; tons of different card games)</li>
<li>Window manager - IceWM</li>
<li>File browser - Krusader (Gnome probably has an equivalent) or mc (without a GUI but very powerful&#8211;type from a command-line)</li>
</ul>
<h2 class="space_above">General Tips</h2>
<ul class="padded">
<li>Always try to apt-get a program before installing from source.  It keeps your system cleaner and everything more interconnected, making it easier to maintain and update.</li>
<li>The <code>man</code> command is your buddy.</li>
<li>If you&#8217;re having a problem (e.g. your music player won&#8217;t play any sounds), chances are someone else has had the same problem before.  Google a description of your problem; if it&#8217;s a lack of configuration for something, you&#8217;ll probably find a HOWTO describing how to get things set up (e.g. <a href="http://www.tldp.org/HOWTO/Sound-Playing-HOWTO.html">The Linux Sound Playing HOWTO</a>).</li>
<li>Get used to the command-line.  Being able to work with just a <acronym title="Graphical User Interface">GUI</acronym> leaves you out of a lot of the beauty of Linux (and Macs).  If you&#8217;re comfortable with both the GUI and the <acronym title="Command Line Interface">CLI</acronym> parts of an operating system, you&#8217;ll be a lot more versatile, of course, (so if your X server won&#8217;t start and all you have is a console, you can still get around, edit some config files, and get stuff working again) and you&#8217;ll be able to do things faster because GUI&#8217;s may be pretty, but they aren&#8217;t always the shortest route to accomplish a task.</li>
<li>Vim is faaaaabulous.  It&#8217;s a text editor that&#8217;s insanely powerful because it&#8217;s got a ton of commands.  There&#8217;s a steep learning curve but it&#8217;s worth it.</li>
</ul>
<h2 class="space_above">Webserver Stuff</h2>
<p><em>Problem:</em>  <code>/var/www</code> is by default accessible by root only, but you want to stick your web page stuff there to be able to access it at <code>http://localhost</code></p>
<p><em>Solution:</em>  You don&#8217;t even have to mess with /var/www; in your home directory (<code>cd ~</code> or <code>cd</code> or <code>cd /home/USER</code> will get you there), make a directory called <code>public_html</code> if you don&#8217;t already have one. You can put your web stuff in there and then access it at <code>http://localhost/~USER</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.3till7.net/2005/12/21/beginning-linux-guide/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Beginning Linux commands</title>
		<link>http://www.3till7.net/2004/07/05/beginning-linux-commands/</link>
		<comments>http://www.3till7.net/2004/07/05/beginning-linux-commands/#comments</comments>
		<pubDate>Mon, 05 Jul 2004 19:23:20 +0000</pubDate>
		<dc:creator>Sarah</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.3till7.net/2004/07/05/beginning-linux-commands/</guid>
		<description><![CDATA[A table of commands that were useful to me when I first began using Linux.  Note that all of these may not apply to your particular distribution, configuration, etc.



Command
Purpose


adduser USERNAME
Create a new user


alias quit='exit'
Be able to type quit and accomplish the same thing as exit


Ctrl-Alt-FUNCTION_KEY
Switch consoles


apt-cache search PROGRAM
Find a particular program and its spec.s


apt-get [...]]]></description>
			<content:encoded><![CDATA[<p>A table of commands that were useful to me when I first began using <a href="http://www.linux.org/">Linux</a>.  Note that all of these may not apply to your particular distribution, configuration, etc.<br />
<!--mizore--></p>
<table>
<tr>
<th>Command</th>
<th>Purpose</th>
</tr>
<tr class="alt">
<td><code>adduser <i>USERNAME</i></code></td>
<td>Create a new user</td>
</tr>
<tr>
<td><code>alias quit='exit'</code></td>
<td>Be able to type <i>quit</i> and accomplish the same thing as <i>exit</i></td>
</tr>
<tr class="alt">
<td><code>Ctrl-Alt-<i>FUNCTION_KEY</i></code></td>
<td>Switch consoles</td>
</tr>
<tr>
<td><code>apt-cache search <i>PROGRAM</i></code></td>
<td>Find a particular program and its spec.s</td>
</tr>
<tr class="alt">
<td><code>apt-get clean</code></td>
<td>Clears out retrieved package files, frees disk space</td>
</tr>
<tr>
<td><code>apt-get dist-upgrade</code></td>
<td>Updates everything</td>
</tr>
<tr class="alt">
<td><code>apt-get install <i>PROGRAM</i><br />
&#8211;fix-broken<br />
&#8211;fix-missing</code></td>
<td>Install <i>PROGRAM</i><br />
Fix the broken thing<br />
Pick up where you left off</td>
</tr>
<tr>
<td><code>apt-get remove <i>PROGRAM</i></code></td>
<td>Uninstalls <i>PROGRAM</i></td>
</tr>
<tr class="alt">
<td><code>apt-get update</code></td>
<td>Do before running <i>apt-get dist-upgrade</i></td>
</tr>
<tr>
<td><code>aumix</code></td>
<td>A tool to adjust volume</td>
</tr>
<tr class="alt">
<td><code>chmod <i>NUMBER</i> <i>FILE</i></code></td>
<td>Change permissions on <i>FILE</i></td>
</tr>
<tr>
<td><code>depmod <i>MODULE</i></code></td>
<td>Lists the dependencies for <i>MODULE</i></td>
</tr>
<tr class="alt">
<td><code>df -h</code></td>
<td>Lists partitions and their sizes, how much of them has been used, and how much space is left on each</td>
</tr>
<tr>
<td><code>du -h</code></td>
<td>Shows how much space has been used in the current directory</td>
</tr>
<tr class="alt">
<td><code>free -m</code></td>
<td>Lists the total mem./swap free/total/used/etc. in megabytes</td>
</tr>
<tr>
<td><code>groups</code></td>
<td>Lists the groups the current user is in</td>
</tr>
<tr class="alt">
<td><code>insmod</code></td>
<td>Add a module</td>
</tr>
<tr>
<td><code>kill -9 <i>PID</i></code></td>
<td>If a program has gotten out of control, run <i>ps aux</i> to find out its PID (second column); then, use this command to end that program</td>
</tr>
<tr class="alt">
<td><code>ln -s <i>SOURCE</i> <i>DESTINATION</i></code></td>
<td>Link something symbolically</td>
</tr>
<tr>
<td><code>lpr -P <i>PRINTER</i> <i>FILE</i></code></td>
<td>Print <i>FILE</i> with <i>PRINTER</i></td>
</tr>
<tr class="alt">
<td><code>ls</code></td>
<td>Lists the files in the current directory</td>
</tr>
<tr>
<td><code>ls -al</code></td>
<td>Lists the files in the current directory; shows &#8220;hidden&#8221; files and more information</td>
</tr>
<tr class="alt">
<td><code>lsmod</code></td>
<td>Lists the current active modules</td>
</tr>
<tr>
<td><code>man <i>PROGRAM</i></code></td>
<td>Displays a manual for <i>PROGRAM</i></td>
</tr>
<tr class="alt">
<td><code>modprobe <i>MODULE</i></code></td>
<td>Activates <i>MODULE</i></td>
</tr>
<tr>
<td><code>mount <i>WHAT</i> <i>WHERE</i></code></td>
<td>Mount <i>WHAT</i> at location <i>WHERE</i></td>
</tr>
<tr class="alt">
<td><code>nslookup <i>URL</i></code></td>
<td>Finds an IP address for <i>URL</i></td>
</tr>
<tr>
<td><code>passwd <i>USER</i></code></td>
<td>Changes the password for <i>USER</i></td>
</tr>
<tr class="alt">
<td><code>ps aux</code></td>
<td>Lists all running processes</td>
</tr>
<tr>
<td><code>rmmod <i>MODULE</i></code></td>
<td>Remove <i>MODULE</i> if it is active</td>
</tr>
<tr class="alt">
<td><code>rpm --test -Uvh <i>RPM</i></code></td>
<td>Test <i>RPM</i> for errors</td>
</tr>
<tr>
<td><code>rpm -Uvh <i>RPM</i></code></td>
<td>Install <i>RPM</i></td>
</tr>
<tr class="alt">
<td><code>startx</code></td>
<td>Start an X session</td>
</tr>
<tr>
<td><code>su</code></td>
<td>Become root</td>
</tr>
<tr class="alt">
<td><code>su <i>USER</i></code></td>
<td>Become <i>USER</i></td>
</tr>
<tr>
<td><code>shutdown -r now</code></td>
<td>Reboot computer</td>
</tr>
<tr class="alt">
<td><code>shutdown -h now</code></td>
<td>Shut off computer</td>
</tr>
<tr>
<td><code>tar jxvf <i>FILE</i></code></td>
<td>Decompress a .tar.bz2 file</td>
</tr>
<tr class="alt">
<td><code>tar zxvf <i>FILE</i></code></td>
<td>Decompress a .tar.gz file</td>
</tr>
<tr>
<td><code>tar zcvf <i>FILENAME</i>.tar.gz <i>STUFF</i></code></td>
<td>Create a .tar.gz archive called <i>FILENAME</i>.tar.gz of <i>STUFF</i></td>
</tr>
<tr class="alt">
<td><code>top</code></td>
<td>Displays a list of processes &#038; CPU/memory usage</td>
</tr>
<tr>
<td><code>umount <i>DIRECTORY</i></code></td>
<td>Unmount <i>DIRECTORY</i></td>
</tr>
<tr class="alt">
<td><code>xv -root -rmode 9 -quit <i>IMAGE</i></code></td>
<td>Make <i>IMAGE</i> your desktop wallpaper</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.3till7.net/2004/07/05/beginning-linux-commands/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
