Linux Beginner Guide

Linux Beginner Guide

Linux Beginner Guide, To anyone who wants to transition from simply being normal user of Linux to the Power User has to come in terms with the Terminal. Following are the some of the most of the common commands and its descriptions which can be utilized for performing much of the task efficiently and effectively. Please follow Linux Beginner Guide


1. Changing into a given directory command is                                     cd

2. List the directory contents with                                                           ls -l

3. Listing the directory with time in ascending order                         ls -lt

4. Reversing the directory                                                                         ls -lt –reverse

5. If you see an interesting file, determine its contents with              file

6. If it looks like it might be text, try viewing it with                            less


Important directories to remember

/             this is the root directory of the linux system

/etc       It contains configuration files, scripts which starts at system boot. All are readable           text. Important files are /etc/crontab (define automated task will perform), /etc/passwd, a list of password

/lib         contains library files such as dll in windows.

/mnt     it count mount points of usb, cdrom etc

/bin        the binaries file of the system

/home   these are the directories which are given to the user

/tmp     temporary files in the system

/usr       largest file directory. It contains all the programs files of the system.

/var       this is the directory where changes to data is stores. Its different from /home and /tmp as they are the static directories.


Manipulating Files and Directories

cp           it is to copy the file

mkdir   it creates directories

rm         it removes the directories

mv          it is used to move the directories

ln            it creates symbolic or hard link


Wildcard Meaning

*                             Matches any characters

?                              Matches any single character

[characters]        Matches any character that is a member of the set characters

[!characters]      Matches any character that is not a member of the set characters

[[:class:]]             Matches any character that is a member of the specified class


Package Management

Different Linux Distribution utilize different type of package management system but falls into two basic system:

Debian Style (.deb)                         Debian, Ubuntu, Mint etc.

Red Hat Style (.rpm)                       Fedora, Red Hat Enterprise Linux, CentOS etc..

Package management mainly utilize 2 types of tool low-level tools which handle tasks such as install/uninstall of files, and a high level tools which performs metadata searches.

To find a package in a repository:

Debian Format: apt-get update, apt-cache search name of search

Redhat Format: yum search name of search


To install a package through terminal:

e.g. Debian format: apt-get update firefox

e.g. Redhat format: yum update firefox

Note: “ You may need to alleviate your rights to admin/root which can be done by sudo command i.e. sudo apt-get update firefox”


Run Levels

Runlevel 3: places your system in multi-user mode with full networking capabilities. The machine will boot to a text-based login prompt with all necessary preconfigured services started. Most servers are run in runlevel 3

Runlevel 5: It is similar to 3, except that it automatically starts X and provides a graphical login screen. Many workstation users prefer this method, because it never forces them to see a command prompt.

The default runlevel used when your system boots can be found in the /etc/inittab

File that looks like id:3:initdefault:, then your system will boot to runlevel 3

In this Linux Beginner Guide. It might help you to understand basics of Linux System.