Linux Guide for Beginners

Linux is a reliable, secure, cross-platform, open-source, multi-user multi-threaded operating system. And best of all, it is free.

Linux has an excellent performance on any processor because it is written in a fast programming language by the best programmers.

Linux is based on Unix which goes back to the old mainframe operating system called Multics. Multics was one of the first multiuser operating systems. The history of Unix operating system goes back to 1965 with the efforts and engineering of developers at Bell Labs, MIT and General Electric.

I personally like CentOS. CentOS is a derivitive of Red Hat Linux and I like the long history, resources, commands and file system configuration. But, you may like different distribution once you start trying them.

Below is a list of a few of the popular distribution of Linux:



What is Open Source Software?

Open source software and applications are developed by the great programmers around the world who contribute their time in order to help everyone, rich or poor gain access to the greatest software.

Open source softwares are usually written in such a manner that can provide every possible features and tools that we need to keep up with today's technology.

Most Linux Operating Systems are generally distributed under a licence created by Richard Stallman and the the Free Software Foundation (http://www.fsf.org) called the GNU General Public License or GPL. Under the GPL Software license:

  • The copyright for software distributed under the GPL is retained by the author of the software.
  • GPL software may be sold with support services but there must be a free version of it available to the public.
  • The source code for GPL software must be available to the public.
  • If other developers make improvements to GPL software, they must distribute it under the same rules outlined by the GPL.

You can find the full GPL license information at the below link: GNU General Public License


Linux File System

Here is a summary of how Linux or Unix filesystem is configured:

/bin - Programs available to all users - (/usr/bin & /usr/local/bin - programs available to local users)

/sbin - Binary Program Files primarily used by the root user. Examples: fdisk & ifconfig

/usr - Programs that are specific to a distribution or local to a specific machine. For example you can find these important open source programs at the following directories: /usr/bin/mysql /usr/bin/mysqladmin /usr/bin/mysqld_safe /usr/bin/perl /usr/bin/php

/etc - System Configuration and Scripts files. These are mostly text files which may be edited to change the behavior of the system and its programs.

Few examples of system configuration files:
/etc/passwd - contains user account information
/etc/shadow - contains encrypted passwords for users
/etc/group - contains group information
/etc/crontab - contains schedule information
/etc/my.cnf - contains MySQL configuration
/etc/sysconfig/network-scripts/ifcfg-eth0 - contains IP configuration information
/etc/sysconfig/network - contains IP gateway configuration information
/etc/resolv.conf - contains DNS configuration information
/etc/sysconfig/iptables - contains Firewall configuration information
/etc/php.ini - contains PHP configuration information
/etc/httpd/conf/httpd.conf - contains Apache configuration information
/etc/inittab - contains system boot information

Few examples of Startup script files:
/etc/init.d/sshd start - starts SSH program
/etc/init.d/httpd start - Starts Apache Web Server
/etc/init.d/mysqld start - Starts MySQL Server

/home - home directories for users specified in /etc/passwd.
/root - home directories for root user.
/boot - Contains Linux Kernel and startup files needed to start the operating system.
/var - Contains logfiles, process ID files, incoming email, variable-lenght files, MySQL databases, etc..
/dev - Contain device files; in Linux/Unix system each hardware or device is treated as a file.
/proc - Contain information on running processes and installed hardware. for example: /proc/cpuinfo
/mnt - Contain mounting points for external drives/temporary file systems. for example: /mnt/cdrom
/lib - Contains shared library files used by several programs.
/tmp - Contain temporary files. Any user may write/create files on this folder; however, only the user who created a file may alter or delete it. (excluding root user who has the full control of the system.


What is the boot sequence for Linux?

When a Linux computer boots, it performs a power-on self-test (POST) and checks for memory and key devices. Then it looks for the boot devices (such as floppy, CD-ROM, first hard drive) for bootable software. For bootable hard drive, Linux system looks in a special sector called the Master Boot Record (MBR) for the drives' partition and format information and a boot loader which tells the location of the bootable software.

Linux systems usually use LILO (the Linux Loader) and GRUB (the Grand Unified Boot Loader). It is possible to use the Windows boot loader or a 3rd party application like SystemCommander. The boot loader allows the user to select which operating system will be used during the boot sequence.

What is the Linux Runlevel?

When a linux sytems boots, you have an option to select a different modes of operation called "Runlevels". This is similar to Windows "Safe Mode" or "Notmal Mode"

There is a default Runlevel configured in the configuration file: /etc/inittab. After the Linux kernel is loaded (/boot/vmlinuz) the system reads the /etc/inittab file for key settings and the default run levels (this is usually level 3 or level 5).

There are six different runlevels most Linux distributions:

Run Level Description
0 Halt. Shuts down system and turns off power.
1 Single User. Starts system and runs as root user.
2 Multi-user without Network File System.
3 Full Multi-user. Use this most of the time.
4 not defined
5 Full Multi-user with X-window login.
6 Reboot. Shut down system and restart.

After the run level is identified, symbolic links to files in /etc/rc.d/init.d from /etc/rc.d/rcX.d (where X is the run level number) are executed in alphabetical order to start or stop (kill) server programs. The ntsysv program is helpful to specify which programs are turned on at boot. The final file to be processed is /etc/rc.d/rc.local which may contain statements to be executed before a login screen is available at the console or remote connections are permitted.

You can use the following command examples to switch between RunLevels: # telinit 5


To read additional information on Linux common commands and linux permissions, user the below resources:
File Systems Comparison - Maximum Characters
UNIX & OS X Commands References
UNIX & OS X File Permissions
More Unix Commands
Unix/Linux IP & Firewall Configuration, etc.
MySQL Administration
Linux rsync
Linux Intalling and Updating with YUM
Linux backing up with Cron and rsync
MySQL Backing Up using MySQLDump and rsync

For Information Contact:
Comentum Corp
6222 Ferris Sq.
San Diego, CA 92121
Phone: 858-410-1500
Fax: 858-410-0707

Sales: 800-387-1920
Hours: Mon. - Fri., 9 a.m. - 5 p.m. PST

Contact Us »


Mobile App Development

iPhone, Google Android, BlackBerry, Windows Mobile
In-house development team.
San Diego, CA, USA.

Learn More

Web App Estimator

Select and unselect modules such CMS or eCommerce for your web application and watch the cost update in real time.

Try It »