Skip to main content

Bash in Red hat

Introduction to Bash
The command line is provided by a program called the shell. Over the long history of UNIX-like system, many shells have been developed. The default shell for users in Red Hat Enterprise Linux is bash, the GNU Bourne-Again Shell. The bash shell is an improved version of one of the most successful shells used on UNIX-like system, the Bourne Shell (sh).
Note: The bash shell is similar like cmd.exe in windows.

Using the Command Line
Commands are entered in terminal at the shell prompt. The standard prompt lists the login name of the current user, the short hostname of the machine, the name of the current directory in square brackets, followed by a $ prompt.
[student@host ~]$
The $ is replaced by a # if the shell is running as the superuser, root, to make it more obvious that it is a superuser shell (which helps to avoid accidents and mistakes in that very powerful account).
[root@host ~]#

Commands entered at the shell prompt have three basic parts:
1. Command
2. Options
3. Arguments

The Commands is the name of the program to run. It may be followed by one or more Option which adjust the behavior of the command or what it will do. Options normally start with one or two dashes(-a or --all, for example) to distinguish them from arguments. Commands may also be followed by one or more Arguments which often indicate a target that the command should operate on.
usermod -1 naresh
Here usermod is a Command, -1 is a Option, and naresh is a Argument.

At first glance, usage statements may seem complicated and difficult to read. However, they became much simpiler to understand once is familar with a few basic conventions.

1. Anything in square braces ([]) is Optional.
2. Anything followed by ... represented an arbitrary-length list of that thing.
3. If you see multiple Option s separated by pipes (|) it means you can choose any one of them.
4. Text in angle brackets (<>) represented variable data. So <filename> means "insert the filename you wish to use here". Sometimes such varibles are simply written in all caps (e.g. FILENAME).

So, looking at the first usage statement for the date command.

date --help
date [option]... [+FORMAT]

Comments

Popular posts from this blog

Red Hat Enterprise version list

Red Hat Enterprise Linux 6 Release/Update General Availability Date redhat-release Errata Date* Kernel Version RHEL 6 Update 4 TBA TBA TBA RHEL 6 Update 3 2012-06-20 2012-06-19 RHSA-2012-0862 2.6.32-279 RHEL 6 Update 2 2011-12-06 2011-12-06 RHEA-2011:1743 2.6.32-220 RHEL 6 Update 1 2011-05-19 2011-05-19 RHEA-2011:0540 2.6.32-131.0.15 RHEL 6 GA 2010-11-09 - 2.6.32-71 Codename: Santiago (based on a mix of Fedora 12, Fedora 13, and several modifications) Red Hat Enterprise Linux 5 Release/Update General Availability Date redhat-release Errata Date* Kernel Version RHEL 5 Update 9 TBA TBA TBA RHEL 5 Update 8 02/20/2012 02/20/2012 RHEA-2012:0315 2.6.18-308 RHEL 5 Update 7 07/21/2011 07/20/2011 RHEA-2011:0977 2.6.18-274 RHEL 5 Update 6 01/13/2011 01/12/2011 RHEA-2011:0020 2.6.18-238 RHEL 5 Update 5 03/30/2010 03/30/2010 RHEA-2010:0207 2.6.18-194 RHEL 5 Update 4 09/02/2009 09/02/2009 ...

Installation Red Hat Enterprise & make standered partition

First of all select DVD and reboot your computer. After Booting from DVD you will get below screen. Select  Install or Upgrade an Existing System and press Enter. If you get the following screen then let Anaconda take another step. Select your preferred  Language and Select  Keyboard Layout . In Following Screen you will be able to see 4 Installation Methods, Let me explain Methods here:- Local CD/DVD – It is obvious that If you use CD/DVD media then Choose this option. Hard Drive – Select this if you have dumped your source into any other Linux partition. NFS Directory – You can select this option if you have configured NFS server. URL – Select this if you want to install using FTP or HTTP Source link. So for step by step installation of RHEL 6 I had  Local CD/DVD Installation Method. If you are not sure about your media then select  OK to verify else select  Skip . If your media is fine till now it will take ...

MBR, Primary, Extended & Logical partition in Red Hat

MBR, Primary, Extended & Logical partition in Red Hat Hard disk and storage device are normally divided up into smaller chunks called partitions. So that different parts of it can be formatted with different file system or used for different purposes. For example, one partition could contain user home directories while another could contain system data and logs; by placing the data in two separate file system on two separate partitions, even if a user fills up the home directories partition with data, the system data partition may have space. Most Red Hat Enterprise Linux system on the x86 and x86-64 processor architectures use the MBR partitioning format for their hard disk. This is the same format that is used by most Microsoft Windows systems, and dates back to the IBM PC.                              Storage device: /dev/sda In this format, the first sector of the disk is reser...