Linux Unit:1 Red Hat Supported Software's:: Language Support and Internationalization

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

LINUX UNIT:1

Red Hat Supported Software’s:


Global File system

Directory Server

Certificate Server

Jboss middleware Application Suite

Red hat Application Stack

LANGUAGE SUPPORT AND INTERNATIONALIZATION:

red hat support 19neen languages. Languages can be selected during the installation or with system-
config-language by system>administration>language.

Language are stored in the etc/sysconfig/i18n place:

The FEDORA Project:

Red hat support the open source project, fast and rapid four to six month cycle release. Supported by
the open source community, red hat does not support this. Easily available on the internet.

WHAT IS OPEN SOURCE:

open and easily available to all on the internet. Source code is easily available to all, integrity of the
other code. Anyone can work on the derived work of some other. Distribution is freely available to all.

LINUX ORIGIN:

In 1984 GUN project free foundation creates open source version of UNIX utilites and GPL (general
Public license enforce the open source principle)

In 1991 LINUS Torvalds:

UNIX like kernel which was open source by using the GPL principles. Ports some GNU utilites, solicits
support available online.

Today Linux kernel + GNU utilities = UNIX like complete open source operating system , packaged for
certain audience as distributors.

LINUX DISTRIBUTIONS:

Linux distributors are unix like operating consist of different software packages built on top of linux
kernel. There are more then six hundred linux distributions out of them three hundrads are in
development stage continuously. These are either personal based or enterprise based. Some are backed
by the red hat liunx while some are backed by the other community or industrial. Like red hat enterprise
liunx is supported by the red hat linux officially is reliable and stable , through tested software having
the professional support services available. Whereas the fedora is newer project having more newer
applications, community supported for personal systems. Similarly the ubunton by the canonical ltd.

LINUX PRINCIPLE:

Everything is file including hardware.

A small single purpose program.

All small programs are linked (chain) together to complete the complex tasks.

Avoid captive user interfaces.

Configuration data stored in the text.


LINUX UNIT:2

Logging into the Linux System:


Two types of the logging screen in to the linux. 1) virtual console (text based)
2) Graphical login (Display manager)
Logging can be done by the username and password.
Each user has a home directory for the storage purpose of personal files.

SWITCHING BETWEEN THE DIFFERENT CONSOLES:


Typical linux system has 6 virtual consoles and one graphical user interface. Server may have one
console and one graphical interface. Desktop and workstations has both. ALT+CTRL+F [1-6] is used
for switching between different consoles. Whereas the ALT+CTRL+F7 is used to switch for the
graphical user interface.

ELEMENTS OF THE XWINDOWS SYSTEM:


Xwindows system is the linux graphical sub system. Xorg is the particular version of the x window system
used by the red hat. (open source implementation of the x)
GNOME : the default desktop envirnment
KDE : an alternate desktop envirnment
Are two desktop environment provided by the RED HAT.

STARTING THE XSERVER:


On some system x serverstarts automatically. The admin should configure that. If not then write the
startx in virtual console and it will run.

CHANGING THE PASSWORD:


Frm GNOME: system>preference>about me>change password
From virtual console: passwd.

Changing Identities
su - creates new shell as root
sudo command runs command as root
m Requires prior configuration by a system administrator
id shows information on the current user

EDITING TEXT FILES:


Nano: a simple text editor, not as packed with feature as the other
Gedit: a simple graphical editor.
Vim: a simple text editor.
Gvim: graphical editor. Graphical version of the vim editor. Not found on my
system.

RUNNING COMMANDS:
Commands are run in the command prompt and have the syntax like:
command options arguments

OPTIONS: are used to modify the commands are used with the single – and are
combine like: ls –abc
ARGUMENTS: Is the file name or other data needed by the commands.
Multiple commands are separated by the ;

COMMANDS:
date : for date (case sensitive)
cal: for calendar

HELP COMMANDS:
Command –help: display usage and arguments summary list. Used by the most
but not the all commands. Like command - - help

man command: provide the documentation for the command. Has chapters in
it.
Navigation MAN pages:
By arrow key, by /text searches for the text, n/N goes to next previous match,
q quits.
Searching the manual:
Man –k keyword list the matching pages.
Uses whatis database.

info command: give information like man, but some time more in depth. Info
pages are like web sites. Each node which is linked are preceded by *. When
navigating by the arrow key, search the words by s, n/p/u goes to next node,
tab moves to next link. Q for quit.
whatis : display short description about the command. Like whatis cal

Red Hat Documentation


User/share/doc: subdirectories for most installed packages.

READING USAGE SUMMARY:


Printed by the help, man command.
Used to describe the syntax of the command.
Arguments in [] are optional.
Arguments in caps or <> are variables.
Text followed by .. means list.
A|b|c| means either a , b, c or abc
-abc means any mix of –a, -b or -c

UNIT NUMBER 4:
BROWISING THE FILESYSTEM:

LINUX FILE SYSTEM /HIERACHY STRUCTURE:


Linux file and directories are structured in to single rooted inverted tree structure. File system begin at
the root directory, represented by the lone / (forward slash character).
Names are case sensitive.
Paths are delimited by the /.

Some important directories:


Home: root/, /home/username.
User executable: /bin, /user/bin, /user/local/bin.
System executable: /sbin, /user/sbin, /user/local/sbin
Other mountpoint: /media, /mnt.
Configuration: /etc.
Temporary: /tmp.
Kernel and bootloader: /boot
Server data: /var, /srv
System information: /proc, /sys
Shared libraries: /lib, /usr/lib, /usr/local/lib

CURRENT WORKING DIRECTORY:


Can be found by the command pwd.

ABSOLUTE AND RELATIVE PATHNAMES:


Absolute path are those which are used to specigy the exact path to the location. Are started by the
forward slash.
Relative pathname: tell the relative path to the exact path name. don’t begin with the forward slash.

CHANGING DIRECTORIES:
Cd to use for the changing directories.
cd – for previous directory.
Cd .. for one level up
Cd for home directory.
Cd /opt/foldername: for the absolute path.

LISTING DIRECTORY CONTENTS:


Command used is: ls [options] [file or directory name]
Options: ls –a: for hidden files. Ls –l: display extra information. Ls –R: for recurcive information. Ls-ld for
directory and symlink information.

COPYING THE FILES:


Command cp is used for copying.
Cp [options] filename destination.
More than file one is copied if the destination is directory.
Cp [options] file1, file2 destinationname.
If the destination is directory then the file is copied there. If destination is file the copy is over write and
if the destination doesnot exit then copying is renamed.

MOVING , MAKING AND REMOVING FILES, DIRECTORIES.


Command mv is used to move files/directory form one place to another. Like mv filename/directory
destination. If destination is file then one file can be move if destination is directory then more then
one file can be moved.
Command touch is used for the making of empty file or updating the time stamp of the file. Command
rm is used to remove the file and syntax is :
Command suntax: rm [options] filename.
Options: rm –f file (force), rm –r directory (recurcive), rm –I file (interactive).

Command mkdir is used for the making of directory, rmdir is used to remove the empty directory while
rm –r is used to remove the directory tree recursively.

NEUTILUS:
Gnome graphical file system browser. Can be acces by the destop system or sapatial or browser mode.
Accessed via desktop icon, hoe directory, application>system tools> file browser.
DETERMINE THE FILE CONTENTS:
Command file [options] filename is used to determine what is in the file and for what it is used.

UNIT NUMBER 5
USER AND PERMISSIONS:

User are assigned a unique user id user id 0 is for root, user details like user name and passwords are
stored in the /etc/passwd directory. Users canot do any thing with out the permissions. Users are
assign the home directory and program that are run when users are log in.

GROUPS: users are assigned to groups. Each group has unique id GIDs. GIDS are stored in the /etc/group
directory.
Wach user is added in their own private group. Each user is assigned the another groups for the access.
Al user in the groups can share the files.

LINUX FILE SECURITY:


Every file is own by the UIDs and GIDs, every process is run by the UIDs and one or more GIDs.
Three access categories:
Process running with the same UIDs as the file user
Process running with the same GIDs as the group user,
And all other process ( others).
If the UIDs matches User permissions apply, if GIDs matches group permissions are applied. If neither
matches then others applied.
File type an dpermission are examined by the ls –l command and first 10 characters are used to display
that.
4 type of permissions: r read the file or directory contents. W write the file or create or remove file from
the directory. X for execution of the program or change in to a directory or for the long listing of the
directory. – for the no permission in the place of r, w, x.
Only root can change the file owner ship by the command chown [-R] user_name file|directory.
Only root and owner can change the group owner ship by the command chgrp [-R] group_name file|
directory.

Changing Permissions - Symbolic


Method
● To change access modes:
chmod [-R] mode file
● Where mode is:
u,g or o for user, group and other
+ or - for grant or deny
r, w or x for read, write and execute
● Examples:
ugo+r: Grant read access to all
o-wx: Deny write and execute to others

Changing Permissions - Numeric


Method
● Uses a three-digit mode number
􀀀m first digit specifies owner's permissions
􀀀m second digit specifies group permissions
􀀀m third digit represents others' permissions
● Permissions are calculated by adding:
􀀀m 4 (for read)
􀀀m 2 (for write)
􀀀m 1 (for execute)
● Example:
􀀀m chmod 640 myfile

UNIT NUMBER 6:
BASH SCRIPTING:

File GLOBBING:
 * - is used for match the none or all characters.
 ? – is used for for matching the single character.
 [0-9] – issued for the range
 [abc] – any character in the list.
 [^abc] – match all except this list.
 Predefine character classes can be used.

TAB COMMAND:
Is used for complete the command or argument (file name).

$, (), “ are used to print the output of one command as an argument of


the other. {} are shorthand for the repetitive jobs. $ echo file{1,3,5}
BASH SCRIPTING:
Is used to put repetitive commands ina file and run them all the suden.
First to make file having the header file like !#/bin/bash
# for using the comments.
For the execution of the file: chmod u_x filename.sh
For running ./ file name.sh

UNIT NUMBER 7
STANDARD I/O
STANDARD I/O TO A FILE.
Operators are used for the input and output of the file.
Like > for the out put and 2> for the error out put.
Like: find /etc –name passwd > find.ot 2> error.out
Pipe are user for the comination of one command out put to the input of
the other command. Output error can not be piped.
Less: is used to vies one page of out put.
Mail : send in put via mail. Like echo “test mail”| mail –s “test”
[email protected]
Lpr : for sending input to printer. Like echo “test print” | lpr –p
printer_name.
&> redirect all output , 2>&1 redirect all stnderror to stndoutput, ()
combine all out put of multiple programs.

Redirecting STDIN from a File


● Redirect standard input with <
● Some commands can accept data redirected
to STDIN from a file:
$ tr 'A-Z' 'a-z' < .bash_profile
􀀀m This command will translate the uppercase
characters in .bash_profile to lowercase
● Equivalent to:
$ cat .bash_profile | tr 'A-Z' 'a-z'
Sending Multiple Lines to STDIN
● Redirect multiple lines from keyboard to STDIN
with <<WORD
􀀀m All text until WORD is sent to STDIN
􀀀m Sometimes called a heretext
$ mail -s "Please Call" [email protected] <<END
> Hi Jane,
>
> Please give me a call when you get in. We may need
> to do some maintenance on server1.
>
> Details when you're on-site,
> Boris
> END

Scripting: for loops


● Performs actions on each member of a set of
values
● Example:
for NAME in joe jane julie
do
ADDRESS="[email protected]"
MESSAGE='Projects are due today!'
echo $MESSAGE | mail -s Reminder $ADDRESS
done

UNIT NUMBER EIGHT:


HEAD , TAIL AND GREP COMMANDS

Grep command is used to search the text by the key word.like


Grep ‘bob’ /etc/passwd
Extracting Text by Keyword
grep
● Prints lines of files or STDIN where a pattern
is matched
$ grep 'john' /etc/passwd
$ date --help | grep year
● Use -i to search case-insensitively
● Use -n to print line numbers of matches
● Use -v to print lines not containing
pattern
● Use -AX to include the X lines after each
match
● Use -BX to include the X lines before each
Match
INTERNET PROTOCOL VERSION 4 AND 6:
IPv4 has the 32 bits address. Where it can accommodate 232 network address.
It can be like: 192.168.2.3 or 10:13:4:5. However IPv4 32 bit address are
finishing in near future.
IPv6: is alternative of the IPv4. It has the 128 bit address. Where it can
accommodate 2128 address. There are also some changes in the IPv6 header
like it has the built in security options. Although it can be added to the IPv4
address by some additional protocols. IPv6 address can be like this:
1050:0:0:5:300:600:300c:326f.

You might also like