Category Archives: Linux Beginners

5 Common Linux Misconceptions

1. The Linux Filesystem Hierarchy is a logical, sensible structure

It’s not. It’s something that has been cobbled together in an attempt to unify diverging practices. In an age of terabyte hard drives its easy to forget a time when you were limited to just a couple of floppy drives for storage and had to store programs across different locations.

That’s why program files today are stored in /usr and /opt. And /usr/local. And /usr/bin and /usr/sbin. Oh and /bin and /sbin. When you can’t store everything in one place, you have to make (sometimes artificial) distinctions between where things go. Remember a time when you used to boot up a computer with one floppy, then put in a second floppy with an application program, then a third floppy with data files?

Someone designing a directory structure in a world where terabyte HDDs are the norm might be persuaded it was a good idea to keep bootup files separate in /bin. But /usr/sbin? /opt? I don’t think so.

Have a look at Gobolinux <http://www.gobolinux.org/> As they say

GoboLinux is an alternative Linux distribution which redefines the entire filesystem hierarchy.

If you want to know what goes where, there’s a nice overview of the Linux Directory Structure here: <http://www.comptechdoc.org/os/linux/usersguide/linux_ugfilestruct.html>

2. Bash is just like the Windows shell, except with different commands

Here’s a simple test. How do you use the ls command to list directories only?

Checking the man page, it’s obviously ls -d, right?

Wrong.

Do a Google search on linux list directories only and you’ll find a lot of people making the same mistake. It all comes down to failing to realise that its Bash that’s expanding the * wildcard, and not the ls command itself.

If you’re going to use Bash, you’re going to have to take a little time to read up on how it works. This is a great site: <http://linuxcommand.org/>

(My preferred method is ls -d */, btw.)

3. The .exe files are in there somewhere

It’s easy to accept that file extensions aren’t necessary in Linux, but it’s hard to shake the idea that something like exe files are still lurking in there somewhere, albeit under different names.

Not really. Linux is far, far more modular than Windows. This is down to the philosophy on which the system is built: programs tools chain their input and output to produce results. A typical Windows application is a flat pack wardrobe, something that solves one problem. A typical Linux application has been formed from many parts using the equivalent of saws, hammers, screwdrivers and chisels.

As an example, a GUI based program that would be a single exe file in Windows would typically be a graphic interface to command line utility in Linux. In terms of user experience, there should be no difference, but behind the scenes, things are very different.

4. Linux is faster/uses less resources than Windows

That may have been true back in the Windows Vista Bloatware days, and it may be true for lightweight distros like Puppy Linux <http://puppylinux.org/> and Damn Small Linux <http://www.damnsmalllinux.org/>, but its not so true now.

Windows 8 may have the worst user interface ever devised, but it installs quickly, loads quickly and runs quickly, matching if not beating systems like Ubuntu 14.04 in benchmark tests.

Why mention Ubuntu 14.04? Well, that leads onto the next point…

5. It doesn’t matter what it looks like, so long as it works

It does.

It really, really matters.

You might do everything via the command line. You might think that Openbox is all you need as far as desktop management goes, but you’re in a minority.

If you’re the only person using your computer, then fine, but if your less technologically inclined partner, friends, parents or children are relying on you to provide the IT then all of a sudden looks really matter.

Of course they does. In a world slowly being taken over by Apple this is so obvious it shouldn’t need saying.

The command line is fantastic, lxde is a miracle of economy, damn small linux is damn fine, but they’re not what most people regard as a solution. What most people want is something that looks good and is so easy to use they don’t even have to think about it. And there’s nothing wrong with that. I don’t care how my shirts are made as long as they look smart and feel comfortable. Most people feel the same way about their computer.

Ctrl-Alt-Delete Task Manager

One of the things I really missed when I moved to Linux was hitting Ctrl-Alt-Delete and bringing up the Task Manager. Okay, maybe I didn’t miss it so much, programs don’t hang anywhere near as often on Linux, but when they did I found hitting Ctrl-Alt-Delete brought up the log out message on my distro.

If all you are looking for is the Task Manager, then open the System Monitor. You can end processes from there.  If you want to know a little bit more, read on…

What is a process? A process is the execution of a command by the Linux kernel. The parent process is called init. Type pstree in the terminal and you’ll see something like the following:

Selection_009

You’re more likely to use the ps command to see processes.

Typing ps in its own will show the processes associated with the user in the current terminal.

Selection_010

Here the only processes running are terminal and the ps command itself.  Notice each process has a PID or Process Identification number associated with it.

ps -e will show every process running. This will produce a long list, so you’ll probably want to use grep to find the process you’re looking for.  Suppose you were looking for nautilus –

ps -e | grep naut

2103   ?   00:00:04     nautilus

You can see from above that the nautilus PID is 2103.  Suppose you want to kill the process.  A little research might suggest that

kill 2103

will kill the process.  Actually, it won’t.  The kill command doesn’t kill a process: it sends a SIGTERM signal to the process asking it to terminate itself.  This gives the process time to clear up behind itself before it goes.

kill -9 2103

will send a SIGKILL signal, terminating the process immediately.

 

 

Essential Applications and Utilities

Coming from a Windows environment, it can be a bit confusing hearing people talk about Nautilus and Gedit.  Where are the File Manager and Notepad?  The following is a list of software that you should know about.  Note that Ubuntu is based on GNOME, so some of these are GNOME utilities.  Other distros may use other applications

Gedit

The GNOME text editor.  Pretty straightforward to understand.

Nautilus

The GNOME file explorer.

Terminal

The command line interface.  Terminal runs the shell.  By default, Ubuntu runs the BASH shell, so you may hear people saying open BASH.  There are various shells available, stick to BASH for the moment.  There is a seperate section here for BASH commands

System Monitor

Similar to the Windows Task Manager

 

 

You may also want to install the following programs

VI

Pronounced vee eye.  An early text editor.  Some people still use it today and can get quite enthusiastic about it.  You should have a quick look at it as it is always installed in some form on Linux distros, and is available even when other text editors aren’t (for example, when the computer is failing to boot properly).  Install vim (vi improved) and follow the tutorial.  It will take you about half an hour.  You’ll be glad you followed it someday.

Emacs

Another early text editor, one still used a lot by developers.  It’s written in emacs lisp and is fully customisable, so much so that it can be used for just about anything.  Install it from the Software Centre and follow the tutorial.  Emacs shortcuts crop up all over Linux (for example, the terminal uses Ctrl a and Ctrl e to jump to the start and end of lines) so it’s worth having at least a passing acquaintance with this program.  I use Emacs a lot.  There is a section on this website devoted to its use…