Boot Your Linux from Your USB Flash Drive

USB Flash Drive SuperTalent Pico-C 8 GB. Stain...
Image via Wikipedia

In this era when portability of computing devices has become a prime concern, Linux has enabled you to carry even your operating system on USB Flash drives. There are various advantages of using these low-cost flash drives to carry your Linux operating system installed. It allows you to use any computer with the same working environment just when you plug your Linux installed USB drive into it. You don’t even need to carry your laptop, or pocket PC to be able to use your own personal computing environment on any computer.

You can install Linux on your USB flash drive in a number of ways. The most common but longest way is to burn an ISO image of installation into a CD/DVD and then, to install it to the flash drive after booting your machine with the CD/DVD. You can also choose to use Linux Live USB Creator in order to easily install Linux into your USB drive. You can also use another application such as unetbootin that may offer you the choice of some Linux distributions that are not available with Linux Live USB Creator.

After you know the advantages of installing Linux on a USB flash drive and various ways of installing Linux on a USB drive, you should also be aware of what choices of Linux distributions you have. The reason why you should know about the suitable Linux distributions is that various Linux distributions are different in terms of their portability, sizes, speed of running if ran from a USB flash drive. Following are few Linux distributions that are being used widely in their USB installed forms:
* Puppy Linux
* Damn Small Linux
* xPUD
* SLAX
* Moo Linux
* PCLinuxOS
There are several more Linux distributions that can run from the USB flash drives. However, if you want to install Linux on flash drive just as a replacement of your desktop based Linux, you should choose a distribution that closely matches the features of your desktop based version of Linux.

Linux Shell Scripting What and Why?

Microsoft Windows 1.0 Six-Page Advertising Ins...
Image by myoldpostcards via Flickr

If you have known any power users of Linux or some of the developers, you would have probably heard them talk about shell scripting or shell scripts. You might even have wondered what these Linux shell scripts are, and why they are used. There is also a myth about the difficulty of using Linux shell scripts among many Linux newbies. However, the reality is, it takes just a clear understanding of Linux shell and knowledge of scripting to be able to successfully utilize the immense power of Linux shell scripts.

A Linux shell is software that allows the users of Linux to issue English-like instructions to your computer. These instructions are known as Linux commands and are passed to the Linux kernel via the Linux shell. In other words, Linux shell provides users an environment for interacting with the operating system without using a graphical user interface (GUI). There are various kinds of Linux shells available, such as BASH (Bourne-Again SHell), CSH (C SHell), KSH (Korn Shell), and TCSH. You can write shell scripts as per the Linux shell of your choice.

A shell script is a set of commands written in a way that they can be executed sequentially without any manual intervention. These scripts are stored in textual files with a .sh extension. Generally, shells are used for manually entering the commands as inputs, whereas with the use of shell scripts you can define the exact sequence of commands, manipulate their parameters and switches, and expect a composite output as a result of running the script.

With shell scripts, you can store output to files, send as e-mails, or show them on screen without typing commands on the Linux shell each time. Repetition of defined sets of tasks becomes much easier than otherwise with the shell scripts. You can utilize shell scripts to automate scheduled tasks or even facilitate system or network administration. Many MS-DOS users think of shell scripts as Linux equivalents of MS-DOS based batch files, but shell scripts are much more powerful than the batch files in MS-DOS operating system.

Enhanced by Zemanta

Understanding CRON to Run Automated Tasks

crontab example.
Image via Wikipedia

One of the widely used utilities of Linux is Cron, which enables users to automate execution of tasks. Cron allows setting up schedules of certain tasks to run at specific times or at specified frequencies. At the scheduled time/dates, tasks are automatically triggered without a user intervention.

Technically, Cron is a daemon that stays resident in memory after getting started once. This is how Cron keeps track of date/time to run specified commands or to invoke specified scripts/applications at their scheduled times. The schedule for running tasks is defined in the configuration files called, crontab. The crond application (the Cron daemon) keeps invoking commands as defined in the crontab files.

You can set up the schedules in the crontab files defining configuration details, such as:
SHELL – the UNIX shell Cron is supposed to run under.
PATH – It is the path to directory (or directories) where the Cron application actually resides.
MAILTO – It is the e-mail address of the recipient of the output of running the Cron jobs.
HOME – It is the Linux home for the Cron daemon.

In addition, date, time, and frequencies for running various tasks are defined in the crontab files against few specific fields. Values for these fields specify the following values related to running the tasks:

Minute – Minute of the hour and can take a value between 0 and 59
Hour – Hour of the day and can take value between 0 and 24
Dom – Date of the month and can take a value between 0 and 30
Month – Month of the year and can either take a value between 0 and 12 or the name of month
Dow -  Day of the week and can either take a value between 0 and 7 or the name of day
User – Name of the user required for running the scheduled job
Cmd – Command that needs to run at the specified schedule

These details are required to configure the tasks to run at specific date/times and frequencies with the help of the Cron utility of Linux.