Category Archives: Linux

All things Linux

Stuff Happens

Greetings fellow LockerGnome blog readers!

The time has come for Gracie and I to say good night to LockerGnome. It’s been fun and entertaining and educational, too. I’ve enjoyed my time here. Chris P. was always my hero when I was a little Internet lad.

I’d like to thank Chris, Bob, and Kelly for all their assistance and support during my tenure here at LockerGnome. It was a pleasant experience, thanks to them.

I’d also like to thank Ron Schenone who got me here in the first place.

Thanks also to all the other wonderful bloggers here at LockerGnome. I was reading before I was writing here and I intend to keep reading after I’m no longer writing.

And lastly, thanks to all my readers for the time they spent reading my ramblings and commenting. It was truly fun.

If you’d like to give a looksee at my new blogs, you can always find me at Nocturnal Slacker v1.0 (technical blog) and Nocturnal Slacker v2.0 (general topic blog). I’ll be there and at my main site.

Say good night, Gracie.

Good night, Gracie. ūüôā

~Eric

Advertisements

An Introduction to the Linux Shell

She sells seashells by the seashore. Well, yes… that may be true, but that’s not the type of shell we’re going to talk about here today.

I’m going to talk a bit about the Linux shell. What is the Linux shell? What does it do? How can I interact with it on my GNU/Linux operating system? Those are all good questions. While today’s most popular distributions of GNU/Linux are morphing into operating systems that are more and more graphic user interface oriented, the real power of Linux still resides in the command line.

When you boot up your Ubuntu or Mandriva GNU/Linux operating systems, most of you see a graphical login screen. Others, like myself, might see a non-graphic command line login. Both do basically the same thing. They log the user into the Linux shell so that he may begin to utilize his system’s potential to perform tasks. That’s what we do with our computers, regardless of what the tasks happen to be… emailing pics to auntie Myrtle or hacking cloud and cluster security systems.

The Linux shell is the interface between you in that seat in front of your monitor and the operating system that controls the hardware in that box under the desk that does the actual stuff you want done. There are numerous shells in Linux; the most commonly used one is called BASH – Bourne Again Shell. You’re in the shell anytime you’re logged into your GNU/Linux operating system; whether you’re interacting with it graphically or from the command line.

Graphic User Interfaces or GUIs are just “front ends” to applications that are running in the shell. I’ll be talking mostly about the non-graphical command line interface here today, though. You can access your command line interface from within your GUI by using the graphic front end application for the command line provided by your desktop environment. For example, in Gnome, you could use Gnome Terminal; or in KDE, you could use Konsole. Either way, these are both just graphical front ends for the BASH shell command line.

When you first login, you’ll get what’s known as a prompt. It is just a blank line waiting for your input (commands). It’ll look something like this:

joe@mysystem:~$

The first part, “joe”, is just the user’s login name. “@mysystem” is the name of the computer the user is logged into. The “~” character tells us that user Joe is working from his home directory. The “$” character is the standard character denoting a non-root, regular user.

Let’s say Joe wants to list all the files in his home directory. All he has to do is type:

joe@mysystem:~$ ls

This command, known as “list”, tells the shell that user Joe wants to see a list of all the contents of his home directory. The shell immediately responds after Joe hits the Return (Enter) key on his keyboard with this output:

Desktop  joe_archives  joe_common     joe_private
Dropbox  joe_backups   joe_downloads

It looks like Joe has five regular directories, a Dropbox directory, and the directory that contains his desktop icons. In reality, there are more directories and files in Joe’s home directory, but they’re what are known as “hidden” files. Their names are usually preceded by a .(period) to make them hidden. If joe wants to see all his directories and files he can list them this way:

joe@mysystem:~$ ls -a

The “-a” option means all. The list command will list all items in a directory when using the -a option. Joe’s list now looks something like this:

.dropbox        .macromedia      .thunderbird
.ICEauthority           .esd_auth    .moz_icons      .viminfo
.PySolFC           .fontconfig    .mozilla      .wicd
.Xauthority           .gconf        .mozilla_3.x      .xchat2

The above directories are hidden by the preceding .(period), as mentioned above.

Let’s say Joe want’s to create a grocery list for his afternoon shopping chores. He can do this via the shell and command line also by using a command line editor such as vim. He would first do this by bring up the vim application in the command line interface:

joe@mysystem:~$ vim groceries

This command would initiate the vim application using a new file called “groceries”. Vim or Vi-Improved, as it’s known, is a non-graphical text editing application. It would look something like this to Joe:

lettuce

tomatoes

catfood

peanut butter

eggs

milk

bread

~

~

~

–INSERT–¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬† 10,1¬†¬†¬†¬†¬†¬†¬†¬†¬† All

Once Joe had finished typing out his grocery list, he would save it using the vim command :wq, which would also close the vim application and bring Joe back to the command line prompt. He could also print his list from the command line like this:

joe@mysystem:~$ lpr groceries

The lpr command would tell the shell that Joe wants to output the contents of the groceries file to the printer. The printer would receive the data and the command to print from the computer’s hardware and begin printing Joe’s grocery list.

All of this we’ve talked about today doesn’t even scratch the surface of the power at your finger tips when using the Linux shell. Your first step should be to read the Linux manual page for the BASH shell. There is some very useful information in that document. Stay tuned here… I’ll come up with some other lessons in the future. Remember what I always say…

Learn something. It won’t hurt you none. I promise.

Later…

~Eric

Slackware 13.37… I Couldn’t Wait

I spent the last day or so wiping/reformatting/reinstalling… SLACKWARE!

I’ve done this so many times since v9.x, that I’ve got it down to the proverbial art form. I initially tried for a tandem upgrade –> 13.0 to 13.1 and then on to 13.37. It sorta’ almost worked. I was having Nouveau/Nvidia issues with 13.1 and again with 13.37; I could boot both to the command line, though. I really borked up 13.37 when I made a error somewhere compiling my kernel. Oh well…

I wiped it all away with a few commands and installed nice and fresh… the way it’s meant to be done. It took me the better part of yesterday and today to get it all up and running the way I like it. All’s well, though. I’m in 13.37. Weeeeee!

Photobucket

Now, I just have to sit and wait for it to go final. That ought to just take a few more days. Once that happens, a little modification of my mirrors file and I should be good to go.

Thank YOU, Pat V… and ALL the acolytes!

Have fun!

~Eric

Patiently Waiting for 13.37

The new version of Slackware Linux is the talk of the Slackers all ’round the Net this past week. Version 13.37 has hit the Testing repos.


It should be released very soon as a stable update. I can hardly wait. I’m still running 13.0 on my desktop system. I am running 13.1 on my lappy. I’m going to plow them both under and install 13.37. I won’t format my /home partitions, though. That way most of my configs and preferences should remain intact. I will have to reinstall quite a bit of software, but that’s OK.

Most of what I need is in the Slack repos. What isn’t, I have Slackbuilds. I may have to upgrade the build scripts, though, or see how fast the 13.37 stuff pops up on SlackBuild‘s server. Either way, shouldn’t be that big of an issue thanks to the simplicity of Slackware. It’s a joy.

*thrumming fingers on desk*

I’m patiently waiting…

~Eric

P.S. Thank you, Pat V. and the rest of the team. Pssst… and Robby, I might give your Xfce 4.8 a tryout in 13.37.

I’m Part of That 3%, I Must Confess

I ran across an entertaining little bit while surfing around the Tech News Daily site this morning. It reminded me of a humorous computer story of my own.

Most of my online tech pals know what I’m talking about when I mention the night the Slacker danced the Irish jig. I’m not much of a dancer, but this one night I danced up a storm on my kitchen floor… on top of my computer tower. Heh! Yeah… it was a sight to see; a 265 lbs, 6’2″ man stomping maniacally on his computer tower that he had just recently scooped off the desk and slammed to the ground… along with all the hardwired peripherals and knick-knacks.

So yeah… I’m in that 3% group who have totally lost their cool and let an inanimate bunch of plastic, silicon, and metal get the best of me.

About nine percent of people have taken their frustrations out on the computer by hitting it with an object, such as a baseball bat or a fist. Only three percent have actually thrown a computer to the ground or against a piece of furniture, such as a desk.*

“What ever could have brought this about?” you might ask. If you can seriously ask that question, you’ve never used a computer before in your entire life. Here’s what happened, though… I had been having some buggy issues with an installation of Linux. I kept losing my configuration preferences and such.

It was really beginning to torque me up. It had been going on for about two weeks. It came to a head one evening shortly after another crash of a fresh installation. That’s when the dance party started. WOO-HOO! Everybody dance now! THUMP! THUMP! THUMP!

After a reassembly into another tower box and some more calm-minded troubleshooting, I tracked the issue to an intermittently failing Seagate hard drive that I had just recently bought and installed on this system. That was the very first… and the VERY LAST Seagate drive I even owned/used. I’ve mellowed over the years, though. I don’t blame Seagate anymore for my near-stroke. I’d buy one nowadays… if the price was right.

But not everyone reacts this way when faced with a computer issue. On the other end of the spectrum, about 38 percent of people said they would never yell at their computer because it’s “too sensitive.” Instead, they encourage it to keep working with positive words.*

*From the above mentioned article.

If you’re one of the above mentioned 38%, you really should seek some professional help. :crazy

Later…

~Eric

Hosts, Toast, and Server Compost

Man! What a weekend this one turned out to be. On Friday afternoon, I nuked my Out of the Woods board by accident.

I had been having some slow, really feckin’ slow server issues for the past month. I was piggybacking on a friend’s server. The friend had been a bit scarce since Christmas and I had not been able to get in touch with him to alert him to the issues. I thought maybe I could tweak the database a bit to revive the board. Uh-huh. I tweaked it alright. I tweaked it into oblivion. More evidence that you really shouldn’t mess with stuff that you’re not familiar with. Gotta’ learn somehow, right?

Anyway, another pal o’ mine who does this do-do for a living offered to attempt to revive my board with my most recent backup. Hey! What the hell, right? Go for it. So, Jay (of http://lachsoft.jaylach.com/) took the ball and ran off. After a while, he reported back that the issue had not been my board’s software or database, but possibly a corrupted/non-maintained server. Alrighty then. I can’t get hold of the friend whose server this is, so what now?

Jay comes to the rescue by offering to serve my board on his server. YAY! The fully revived Out of the Woods board is now LIVE and functioning again. It can be found at its new home –> http://vtel.jaylach.com/index.php Please stop on by if you get a minute or two. There are a bunch of great folks there. Tell ’em Eric sent you. Oh, and if you’re planning on spamming that board, forget it. All memberships must be Admin approved. You’ll never get past the gate keeper.

Have a great week, folks! Life is GOOD!

Later…

~Eric

Arch Steps Up – Debian Takes a Backseat

I recently did some soul searching regarding my GNU/Linux philosophy. I found that I wasn’t being true to myself.

For years now, I’ve run Slackware Linux as my primary operating system and a second, fully updated version of Debian as my¬† secondary OS. I’m a firm believer in simplicity and stability. I enjoyed both of those qualities in Slack and Deb, of course. They are both rocks when it comes to stability. I’ve never had a crash in either operating system that was due to the OS itself. Any crashes were usually caused by something stupid that I had done.

All that being said, while contemplating upgrading from Debian Lenny to Squeeze, I had an epiphany. Slackware and Debian are not very much alike, other than their common quality of stability. Where Slack has a relatively small application set; Debian’s repos are huge. Where Slack uses close to the newest versions of its software; Debian uses versions that are typically three to four releases old (VERY stable and proven stuff).

It was always difficult for me to sync Slack’s apps with Debian’s in my primary and secondary operating systems because of the discrepancy in releases; especially so with Mozilla apps like FF and TB. This got me thinking… maybe Debian, even though it had always been my fall-back operating system, might not be serving my purposes that well after all. Is there something better out there for what I want to do?

As most of you know, I have five tester slots on a dedicated drive just for trying out and learning other distributions of GNU/Linux. No, I don’t do virtual. I like to REALLY install and set up operating systems. Virtual computing is like virtual sex. It works, but it’s not nearly as much fun (or as messy). In one of my tester slots there is almost always an installation of Arch Linux. Why Arch? Well, it’s a cool distribution. That’s why.

Seriously, Arch is a very stable, very robust distribution of GNU/Linux. It’s been around about ten years now. It’s a fork of the old Crux branch of the Linux Tree. I started playing around with Arch about three years ago, I think. I was impressed right off the bat. One of the greatest things about Arch is its outstanding support community, particularly the wiki. There is an abundance of information for Arch users of all sizes and shapes. Support is a good thing!

As a result of all this deep thinking and philosophizing, I decided to install Arch as my official secondary operating system. I spent the past three days installing and setting it up. I’m using it now to post this article. I have everything set up to closely match my Slackware installation. I keep both sync’d (manually) and updated. If my Slack craps out, I can always boot Arch and seamlessly carry on until I fix my Slack. Odds of Slack crapping out? Null. You never know, though.

Give Arch a try. You might be impressed. For a very good tutorial on installing Arch, see securitybreach’s tutorial at Scot’s Newsletter Forums – Bruno’s All Things Linux.

My Arch w/ Xfce Desktop Environment

Later…

~Eric

5 Things I Hate Most About Linux

The GNU/Linux computer operating system created through the sewing of miscellaneous Richard Stallman body parts around Linus Torvalds‘ heart is not perfect. Here’s a list of my 5 top pet peeves:

  • coming in at #5 is the fact that using the GNU/Linux operating system causes me great distress due to the guilt of not having paid $300+ to purchase this operating system in a very earth-unfriendly, made-in-China package from my local Bloat Buy retail software outlet.
  • #4 would, of course, be the pain caused by my empathetic tendencies toward those poor souls out there using other operating systems, and my terrible evangelistic need to convert them all. I’m becoming a damned Jehovah’s Witness of GNU/Linux… *Knock-Knock* “Hello, ma’am. I’d like to talk with you a bit today about the everlasting joy of Linux. Come to the light with me, won’t you? Yes, you can bring your cat, too.”
  • 3rd on the list is the fact that GNU/Linux does not follow the engineered obsolescence business plan that has kept free markets and manufacturing buzzing for the past 50 years. It is instead a steady, long-life item that will eventually put many folks out of work. Besides, the best distributions are given away for no cost at all. What’s up with this? This is NOT your granddad’s Capitalism, comrades.
  • my 2nd most peeving peeve is the gnawing certainty that the GNU/Linux was actually a technology that the C.I.A. leaked after discovering its usage in the computers on that crashed alien craft that’s kept in storage in Area 51. No current human intellect could have come up with something so efficient and useful. I think the aliens may have assimilated us without our knowledge or consent. Maybe that’s a good thing, upon further reflection.
  • and first/foremost on my list is the fact that GNU/Linux has increased my boredom exponentially over the last 5 years. I no longer have to run crap cleaners, antivirus apps, defraggers, malware hunters, cookie cullers, bloated/inefficient backup apps, etc. Sheeesh! I have all this time on my hands to do really useful computer stuff nowadays. So, what do I do? I choose to sit here and tap out masterpieces such as this one for your entertainment and enlightenment.

I HATE Linux! I love that little penguin, though.

Later…

~Eric

The PATH to /home/timmy/grannys_house

Back in the old days, when Timmy wanted to visit granny’s house, all he had to do was have Lassie lead him there. In today’s more complicated computer world, it takes a bit more understanding.

We’re going to learn a bit about a very important subject in Linux. It’s called PATH. The path to a file or whatever on your Linux operating system is something that you need to understand when manipulating files from the command line. Another term we’ll look at briefly is the working directory.

When Timmy, as a regular user, opens his terminal from his GUI or from the post login command line (Run Level 3 – multi-user, no X running), his working directory is in /home/timmy. Whichever directory you are in at the time is known as the working directory. Timmy may navigate to another directory using the cd command. Let’s say he navigates to /usr/bin. At that time, his working directory becomes /usr/bin. See how this works?

Think of the Linux file system as a multi-room house. If you’re in bedroom4 right now, your working directory would be /house/bedroom4. If you walked out of that room and down the hall to bathroom02, then your working directory becomes /house/bathroom02. At that time, you may then use the command micturate. Heh! A little bathroom humor there.

OK, so now we know all about the working directory, right? Moving on…

Let’s say that Timmy wants to copy a .jpg that is in /usr/share/wallpaper over to the /home/timmy/grannys_house directory. He would open his terminal, which would then be sitting there with that blinking cursor waiting for Timmy’s next command:

timmy@lassies_machine~:$ |

Timmy’s working directory at this point is /home/timmy, as designated by the command line shorthand character ~ . If Timmy wants to copy the .jpg without actually going to the directory that it’s in to copy it, he must provide the proper path in his command.

timmy@lassies_machine~:$ cp /usr/share/wallpaper/cabin.jpg /home/timmy/grannys_house

The above command, using absolute path names, directs the shell (command line interpreter) to copy the cabin.jpg image from the /usr/share/wallpaper directory to the /home/timmy/grannys_house directory. If Timmy wanted to just make a duplicate of a file in his /home/timmy directory, then he could leave off the / character when showing the command line the proper path. This can be done because he’s already in the /home/timmy directory. It is his working directory. He can now use a relative path to direct the shell to make the copy.

timmy@lassies_machine~:$ cp cabin.jpg cabin.jpg_backup

In the above example, notice that there is no / being used. Timmy is simply making a backup copy of cabin.jpg. Both files are relative to his working directory, so the shell understands that Timmy just wants to make this duplicate right there in that same directory.

It’s really not rocket science, to use that worn out old clich√©. The command line can be pretty simple once you get the hang of it folks. You know what I always say… Don’t fear the command line. I hope you’ve learned something here today. Remember to click the links within the article. You’ll find some more useful information and a few definitions for you there.

Later…

~Eric

Further reading:

Unix Commands @ Wikipedia

LinuxTutorial.info

Linfo.org

Paul Sheer’s Rute Users Tutorial and Exposition

Image credits: Timmy (Jon Provost) and Lassie image owned and copyright by Classic Media

Xfce 4.8 – The Little Mouse That Roared

It’s here, folks. We’ve been patiently waiting for this one… version 4.8 of everyone’s (mine, anyway) favorite desktop environment –> Xfce!

There have been many improvements, judging by the release notes. Read more about it here –> http://www.xfce.org/about/news/?post=1295136000 It may be a bit before you start seeing this in your distribution’s repositories, but you can always attempt an install from source, if you know what you’re doing.

For you Slackers (users of Slackware Linux) out there, Robby Workman has a Slackware Package of 4.8 on his server. Don’t forget to read his NOTES and install the dependencies (which he also provides for you) in the order he suggests. Of course, install at your own risk. If you have an experimental installation of Slack, as I do, it might be better to play with it in that installation rather than your primary OS… just in case, you know.

Ever since KDE4 became a fat, over-bloated MS Windows-like clone, Xfce has been my primary desktop environment. Aww, shucks! I’m just kidding about KDE. It’s fine too, as long as you have 12Gig of RAM and a water-cooled, over-clocked quad-core processor… and don’t mind the occasional system crashes.

Anyway, watch a repository near you or take the bold approach and install from source. Either way, you’ll come to love that little mouse.

Later…

~Eric

Image credits: Xfce logo Copyright 2003-2011 Xfce Development Team