Beginners Introduction to Linux

LXDE-OPENBOX Guide
Beginner's Guide
After Installing Openbox
Alternatives & Galternative
Wallpaper Changer
Arachnophilia HTML
Araneae HTML Editor
Fbpanel
FastStone Image Editor
Image Magick
9menu
MyStuff Menu
Openbox Menu
Openbox Dock
Openbox Dynamical Menu
Openbox Themes
PhotoFiltre Editor
Poor Mans Radio Player
Terminal Apps
Wbar Dock

What is Linux? Linux is an open-source computer environment that offers a free alternative to Microsoft Windows and Apple Macintosh. The key word is free. This not only means it will cost you no money to install a Linux operating system on your computer but you will be free of all the hinderances, protections, secrecy, security updates and handicaps that automatically come with a proprietary system whose main purpose is to make a livelihood for a small set of people. Everything in Linux is open for anyone to see and change. This means that when my system misbehaves, there is a good chance that I can find and correct the cause, or find someone or some article that fixes the problem. This means that I can design a file system, a desktop and a set of applications the way that I like. I do not have to accept a single, rigid system, which is basically all that is offered by Microsoft and Macintosh. Finally, Linux works, and can be easily designed to work faster than any of the proprietary competitors!

linux file system

To make reasonable use of any computer system, a user needs to be comfortable with the files and their layout. So, first a few words about the Linux File System in general. The container heirarchy for a Linux system is different from Windows. Windows has the big chest, Computer, and then a flock of rather general boxes nicely named with letters: C, D, E, etc, each heading up its own heirarchy. Linux has only 1 big chest (heirarchy), called the File System and denoted by /. / has several drawers called directories, each of these in turn has its own drawers (sub-directories), etc down the line. There is a sense to the way these directories, sub-directories, etc are named, but don't be too concerned about not being knowledgeable in this regard. A Linux system contains hundreds of system directories or sub-directories. All the directories except one, which is labeled home (/home), contain operating system files, applications, documentation, everything associated with the actual functioning of the computer that are not user related. These files are system-wide and apply to all users.

The general Linux system is designed for the most complicated scenario, namely, a computer with many users, each with his own files and privileges. The home directory has a folder (sub-directory) for each user of the computer, and the files in each of these sub-directories is user specific, that is, the files and sub-directories in /home/me will only apply to the user Me, and those in the directory /home/doug will only apply to the user Doug, etc. The double meaning and somewhat illogical use of the slash symbol / hopefully does not confuse the reader. It should be always clear when "/" denotes the file system directory and when it denotes the boundary between a directory and one of its subdirectories as in "home/me". /home/me will include Me's personal files (documents, music, videos, etc) and some computer-related files relevant to only the user Me. These user-specific computer files will not generally be automatically seen when opening the directory me. The user-specific computer files inside me are hidden unless Me chooses to make them visible by clicking View in the file browser's taskbar and checks Show Hidden. Usually these hidden files are configuration files associated with applications that are user-specific to Me. Files that are hidden when initially entering (opening) a directory, regardless of the directory, begin their name with a . (dot), for example, .local. Unhidden files can be changed to hidden by simply renaming them starting their name with a dot, for example, xyz can be hidden by renaming it .xyz.

Every Linux system has one or more users designated a Superuser and named Root. Root has a directory called root in /. Root has full access to the computer, and the root directory contains all the system-wide computer files. A word of caution is in order. A Linux system is designed to protect itself from ordinary users like Me by greatly limiting Me's ability to alter computer folders, but has little defense against Root-Me, who can change just about anything in any directory. So care needs to be practiced when Root-Me is engaged in a task. When editing a computer file it is good practice to first back-up the original file, and second, making many simple edits and actually checking the effect of each one before making the next one, rather than making one many-sided edit and then doing a check of the effect. Although care must be taken when working with files as Root,a non-root user can be relaxed when investigating system-wide files. Most Linux computer files are text files and can be opened and read by any user with any text editor. Feel free to read them, because this affords a way to learn. Reading is about all that can be done without becoming Root, and so it is hard to screw up your system. So, right-click, open-with-any-text-editor and read, study and learn, without anxiety!

For a user, the main components of an operating system are the following:

The file manager or file browser is the chap who opens the drawers in your computer chest. A web browser, or just browser, is the chap who opens the drawers of the big universal chest, the Web. Well known examples of web browsers are Internet Explorer, exclusively for Microsoft Windows, and Firefox and Chromium-Browser for a variety of operating systems including most Linux systems. However, Linux distributions offer a variety of web browsers and file managers with a variety of features. A Window Manager is a system software that controls the placement and appearance of windows, that allows the user to open, close, minimize, maximize, move, resize, and keep track of running windows, including window decorators. A Desktop is an additional software that includes a Windows Manager and add additional features like taskbars, panels, menus, application launchers, tools to configure and tweak settings and the glue that makes all these features work together. Windows and Mac come with pretty specific graphical interfaces (you know, the windows, the skin, the system toolbars, etc.) that aren't really built for customization. With Linux, you can fully customize not only how your desktop looks, but even its functionality, and the settings available in its preferences. The best known default Linux desktop environments are GNOME, KDE, XFCE and LXDE. However, there is nothing preventing a knowledgeable user from customizing virtually any compatible combination of these. A chart showing system memory useage for the 4 main systems is shown at the bottom of this page. LXDE has always been the clear winner in such tests.

A user has two options for communicating with an operating system (computer). One is geometrical by means of a GUI (Graphical User Interface) and one is with words or symbols. Every operating system has a program called the shell which takes the commands that a user types on the keyboard and gives them to the operating system to perform. Some of these commands are saved as shell scripts to direct the computer every time he is switched on. There are several shells in existence. Debian based distributions use one called bash (Bourne Again SHell). The main difficulty in using the shell is that it has its own special language which includes both a special vocabularly and a special grammer. And not only does a user have to learn a new language but he has to learn to use it precisely. There can be no sloppiness - no spelling errors or grammatical errors. Otherwise, there is nothing mysterious or difficult about bash, just another language course. My advice to beginners, whose professions will generally not involve shell languages, is to use it precisely and carefully but learn only what you have to know as the need arises.

In Linux the vehicle for using bash is generally called the Terminal or Terminal Emulator. Clicking a Terminal entry in a Menu brings up the starting terminal picture, as shown on the right. The grey rectangular box is where the command is to be entered; the $ sign indicates a normal user (Me); and the tilda (~) means the user is issuing the command from his home folder (/home/me). In other words, ~ = /home/me. Terminal pain for beginners can be greatly reduced by memorizing the following 6 commandments right at the start:

When you open a computer directory not in your home directory, you are generally prevented from doing much beyond right clicking and reading text files. This is because you are there as normal-me. Some file browser's offer in their menu bar the immediate opportunity to switch directly to root-me. This Open Current Folder as Root choice really speeds up the process, because then you can edit any of the files in the same way as you would do to files in your home directory, that is, files that you own. In other words, you have all the priveleges of reading, writing, moving, coping, editing, dragging, deleating, etc, without ever invoking the Terminal.

There are several ways to install or remove applications with a Linux distribution. Most have an application repository. For example, the Ubuntu repository has over 30,000 entries. One of the most important considerations a beginner should make is to consider the size of a distribution's application repository since a computer is only as good as the applications that it can run. The main GUI program for installing applications in Debian based (Ubuntu, Mint, etc) distributions is called Synaptic Package Manager. Open Synaptic Package Manager, wherever it may be in the Main Menu. Type in the search box whatever you are looking for. When you find it, right click on the name and follow the prompts, which will allow for a variety of Installation and Removal options. Synaptics has a very useful tool that is easy to miss. Click Package/Properties in the heading after highliting an application in the repository list. A box will appear on which is a load of information about that application. The same information can be obtained by right-clicking the application's name.

Simple Bash Commands by Example

apt-rdepends xyzLists dependents and subdependents of app named xyz (provided apt-rdepends is installed).
apt search keywordSearches for anything with keyword in name.
cdPuts you in your home directory for issuing next command.
cd ..Puts you in directory one above.
cd -Puts you in the directory that used to be current before the most recent cd command. Convenient for alternating between two directories.
cd /usr/sharePuts you in share folder for issuing next command.
clearClears the terminal window.
curl ifconfig.coGives your IP address.
dpkg -s appTo see if app is installed, and to get information about app.
dpkg-reconfigure tzdataTo edit date and time.
echo $PATHshows directories computer automatically searches for execs
eject sr0ejects the cd-dvd player
find . -name "*.tex"Lists names of .tex files in directory & subdirectories of directory you are in.
find . -name "*.tex" -exec cp "{}" ~/tmpCopies .tex files in directory & subdirectories of directory you are in to ~/tmp.
find /usr -user meShows files in /usr owned by me.
find /usr ! -user meShows files in /usr not owned by me.
file /usr/bin/xyzShows file type of file xyz in /usr/bin
freegives information about computer's ram
getconf LONG_BITTells bit size for your system.
grep sparky *.txtLists line containing the word sparky in all .txt files in directory you are in.
grep -i sparky *.txtLists names of .txt files containing the word sparky in directory you are in.
grep -rl "sparky"Lists names of all files containing the word sparky in directory and subdirectories of directory you are in.
grep -rl "sparky" ~/downloads/racesLists names of all files containing the word sparky in directory and subdirectories of ~/downloads/races.
grep -rl "sparky" | tee ~/output.txtPrints results of grep -rl "sparky" in ~/output.txt, which needs to be setup first.
pdfgrep -in sparky *.pdfLists line containing the word sparky in all .pdf files in directory you are in. (pdfgrep needs to be installed.)
pdfgrep -in sparky *.pdf | tee ~/output.txtPrints results of grep -rl "sparky" in ~/output.txt, which needs to be setup first. (pdfgrep needs to be installed.)
inxi -FProvides information about the computer.
lsLists items in directory that you are in.
lspci | grep -i ethernetIdentifies network card.
lsusbLists items connected by USB.
lxpanelctl restartRestarts lxpanel.
lxpanelctl runExec for Run.
man xyzProvides information about xyz.
md5sum /home/me/linux.isoshows md5 number for /home/me/linux.iso .
passwdchange password.
pkill appshutsdown app.
ps auxlists all processes running on the system, including Process ID (PID).
pwdPrints absolute path to current directory.
startxstarts desktop session.
uname -rgives information about kernel
wget http://website.com/xyzdownloades xyz.
wget ftp://ftp.website.com/xyzdownloades xyz.
sudo cp /usr/share/icons/xyz /sbinCopies file xyz from /usr/share/icons to /sbin (see Section 5 above).
sudo cp /usr/share/icons/* -r /sbinCopies files and directories in /usr/share/icons to /sbin (see Section 5 above).
sudo cp*.jpg /usr/share/iconsCopies all the files with extension .png to /usr/share/icons (issued from directory).
sudo cp xyz* /usr/share/iconsCopies all the files whose name starts with xyz to /usr/share/icons (issued from directory).
sudo ifconfig -agives internet connection information including MAC address
sudo mv /usr/share/icons/xyz1 /sbin/xyz2Moves file xyz1 from /home/doug to /sbin and renames it xyz2 (see section 6 above).
sudo mv /usr/share/icons/* /sbinMoves all the files in /usr/share/icons to /sbin.
sudo mv*.jpg /usr/share/iconsMoves all the files with extension .png to /usr/share/icons (issued from directory).
sudo mv xyz* /usr/share/iconsMoves all the files whose name starts with xyz to /usr/share/icons (issued from directory).
sudo rm /tmp/xyzRemoves (deletes) file xyz in /tmp.
sudo rm -r /tmp/xyz/*Removes (deletes) all files in directory /tmp/xyz.
sudo rm -r /tmp/xyzRemoves (deletes) directory /tmp/xyz from the system.
sudo ln -s path-to-folder path-to-symlinkCreates a shortcut, stored in symlink, to folder.
sudo mkdir /dev/xyzMakes a new directory named xyz in /dev.
sudo mkdir -p /dev/xyz/abcmakes both directories named xyz and abc (all needed directories on path).
sudo xkillMakes the cursor act as a terminator (requires x11-utils be installed).
sudo service network-manager startRestart Network Manager in notification area.
sudo shutdown -h 0Shuts down computer.
sudo shutdown -r 0Reboots the computer.
sudo fdisk -lShows all partitions on all hard drives. df -h shows used-available data.
sudo add-apt-repository ppa:user/ppa-nameWill add repository with name user/ppa-name. See also /etc/apt/sources below.
sudo apt-get cleanCleans system.
sudo apt-get auto cleanCleans system.
sudo apt-get updateUpdates system, run first.
sudo apt-get upgradeUpgrades system. Run after updating.
sudo apt-get dist-upgradeStronger system update.
sudo apt-get install xyzWill install xyz - do not include package type, for example, enter xyz for xyz.deb.
sudo apt-get install --no-install-recommends xyzWill install xyz without extra recommended packages (crud).
sudo aptitude install --without-recommends xyzWill install xyz without extra recommended packages (crud).
sudo apt-get remove xyzWill remove (uninstall) xyz (first cd to directory containing xyz).
sudo apt-get remove --purge xyzWill remove (uninstall) xyz including installer and dependencies (first cd to directory containing xyz).
sudo apt-get f xyzMay fix broken xyz (first cd to directory containing xyz).
sudo update-grubUse if booting is troublesome.
sudo ufw disableTurns off firewall.
sudo leafpad Will open text editor (leafpad) to edit computer text files. Use leafpad taskbar and/or file directory to find file (Use style in 6. above for hidden files.). Be sure to save after editing. File type is not usually identified in names (see file above).
sudo chown me /usr/bin/xyzChanges ownership of xyz to me.
sudo chmod abc xyzIssue from directory containing xyz. Assigns access rights to xyz according to the following code: full=7; read & write=6; read & execute=5; read only=4; write & execute=3; write only=2; execute only=1; none=0 (x=you, y=group, z=all others). Thus, sudo chmod 777 xyz gives full access to xyz to everyone and every group.
sudo chmod u+x /usr/lib/xyz/*Makes all files in directory /usr/lib/xyz executable;
Use gksu instead of sudo for some operating systems.


Major Distributions

A newcomer investigating using a Linux distribution is likely to be overwhelmed by the number of choices. After being a regular linux user and trying many of these distributions for several years, I've come to the conclusion that this apparent choice spectrum is very misleading. Most of these distributions are mild perturbations of a few main distributions. Many are hobbies of one or two people and do not really offer anything new. They are occassionally unreliable, and can come and go overnight. I think it is wisest to stay with a major distribution, or a known popular close off-shoot that has a large support group and forum.

There are about a dozen really different base distributions. Of these, I would list 6 as good choices for a newcomer or person who is mostly interested in a good end-user experience. These 6 are high in popularity, have a substantial support group, reasonably long history and deserve to be rated unique in what they offer. They are, listed alphabetically:

Debian is the mother of most, if not all, of the Linux distributions. It offers 3 distributions, Stable, which is super stable, Sid, which is experimental and can be unstable, and Testing, which is inbetween Stable and Sid. A good offshoot of Stable is Watt, of Testing is Sparky Linux and of Sid is Vsido. These offshoots are well supported, have the best forums for getting help and are developed by some very smart people with emphasis on the user, which means they have smoothed out some of the Testing and Sid rough edges They are very reliable, easy to set-up and are my favorites.

Ubuntu was based on Debian, but has progressed so far that it is definitely a unique distribution by itself. It is the distribution that popularized Linux to the point it presently occupies and is probably the most used Linux distribution. Zorin is an independent excellent off-shoot that is well supported and directed to being most like Windows was. Mint is Ubuntu and Debian based for everything but LMDE, which is just Debian based. However, it also has progressed to the point of being independent and enough different from its base to be a base itself. Mandriva does not seem to exist anymore, but its offshoots, Mageia and PCLinuxOS, are popular and thriving in their own right. I have never tried Fedora, and only used Open Suse sparingly.

There are a few others that deserve a categorization as independent, or not really based upon any of the above. However, they are more for the experienced Linux user, and should be treated accordingly. These include, among the most popular:

A very nice distribution based on Arch Linux is Manjaro. Unlike Arch, the installation sets up the basic system, so that most of the initial work is done and the user can get on with learning already with a capable working system.

My favorite distribution is Sparky Linux LXDE or Base. If storage is not a limiting factor, then choose Sparky Linux Lxde, which is really well endowed with applications and special scripts. In my opinion, it is the best distribution for beginners in the sense that everything needed to just about do anything is present and already well configured. So a beginner who doesn't want to spend much time learning about the system will be still very happy. If you have a storage limit or are not afraid of text configuring, then choose Sparky Linux Base.

memory-comparison
This graph shows the LXDE system used the least Ram, about half that used by the next best major desktop, Xfce. The systems using less memory than LXDE are just window managers. The window manager for LXDE is Openbox. For the conditions of this test, see Wordpress.

Debian Forums
Sparky Linux Forums
Sparky Linux
Wine Applications
Why Linux is Better
Windows 7 Sins