Overview
Usage Tips i like linux for Leaning curve Linux intro Boot Shell Package Editors doubt linix init process Deamon process Bash shell Dirctory structure 13 Env_ Variable Autosys
1: Usage Tips
link file | i can create link for folders which i often use. esp. when working with SSH or putty tool | ||
Alt+F2 | to open a command or file or folder | calibre | |
chrome | |||
partition | create roort (/) , Swap, /home partition only. So that when update to new version Please un select home partion. It will retain | goldendict | |
keep all the film, photo, songs, tech, etc. Partition as folder. Not as hard disk partion. Easy to backup and restore. | openssh-server | ||
windows key | use this key to launch menu. | eclipse | |
Youtube-dl | |||
scale mode | Ctrl+Alt+down arrow for open scale mode. | recordMyDesktop | |
Expo mode | Ctrl+Alt+up arrorw for activate expo mode to see all active workspace | freefilesync | |
switching workspace | Ctrl+Alt+right/left arrow for switchng workspace | ||
launcher | create a launcher icon for eclipse | ||
shut down | press power button once. [ no need long press ] | ||
install | sudo apt-get install <packagename> | ||
prepare the above command for all the software, so that once updated os easy to install all the necessary s.w | |||
keep those commands in single script file | |||
uninstall | Uninstall the all the software which i never use | ||
TTY Terminal | Ctrl+Alt+F1.....F7 to move TeleType command mode., those are useful for run big jobs | ||
Ctrl+Alt+F8 to move GUI mode. | |||
Disk usage analyser | use this to know which folders takes more space.... it is really good | ||
music metadata edit | Easytag – applications |
2: i like linux for
it is added-on for experienced software engineer |
i can switch to administrator privileges without log off by simply type sudo commend |
virus free and cost free |
different experience from Windows OS |
learn and be practised with linux commands and shell script |
no wizard to click..click while is install software |
instlling software completed by just a shell script |
3: Leaning curve
shell and its facility | actual task in office | |
vast area | large no. Of commands and its options | actual task in office |
shell script | actual task in office | |
Vi editor usage | actual task in office | |
Environment variable usage | actual task in office | |
theory knowledge | History of unix / linux | |
theory knowledge | File system and its folder structure | |
theory knowledge | X window system | |
theory knowledge | Network in unix/ linux | |
theory knowledge | Boot process & init process & Deamon process | |
theory knowledge | configuration files in /etc/init.d folder | |
theory knowledge | run level of scripts in /etc/init.d folder | |
theory knowledge | some basic deamon process and its role | |
personal usage | how to install / un install package | |
i am not going to create any command/tool for linux, | ||
i dont want to learn low level detail of Unix/Linux, like how it is work |
4: Linux intro
POSIX | the unix suit of standard | ||
1969 | unix conceived and written at AT & T labs | in assembly language | |
1973 | unix re written by tennis ritche | in c language | |
1975 | Unix offered to college for low cost | ||
1984 | started to selling Unix by AT & T labs | ||
1983 | Richard Stallman started GNU project | a unix compatible but alternative OS in free | |
1990 | GNU project almost completed except few items | like kernal, device driver, deamon and etc are not completed | |
1991 | Linux first version 0.01 released | ||
1992 | BSD project started | it is combination of NetBSD and FreeBSD | |
1994 | Mach Kernal released, used by os x , apple | ||
BSD & Berkely | it is open source version(flavour) of UNIX | ||
Solarix, AIX, HP-UX | it is Commercial version(flavour) of UNIX | ||
MINUX - is education OS | |||
Torvalds | he bought MINUX OS | ||
he developed kernal | |||
then incorporated many applications of GNU Project component( free ) | |||
Linux OS | it is running from small device ( mobile, embbeded to super computer and big servers ) | now linux OS ready | |
easy to customization is biggest benefit the company and hardware vendor to support linux | |||
Linux vendor and communities | they combine Linux kernal , GNU - application( component ) and Non-GNU components, even their own components and tool and then distributes | ||
linux is free and open source | |||
so Linux is a Unix- LIKE Operationg System. | |||
Linux obtained many concept and ideas from Unix | |||
Such a system uses a monolithic kernel, the Linux kernel, which handles process control, networking, and peripheral and file system access | |||
Device drivers are either integrated directly with the kernel or added as modules loaded while the system is running | |||
Linux components/tool/application/command | The GNU userland is an important part of most Linux-based systems, providing the most common implementation of the C library, a popular shell, and many of the common Unix tools which carry out many basic operating system tasks | ||
most of component or tool written in c - language | |||
X-Window system. - on top of this linux GUI tool built | |||
User interface | Command Line interface / GUI | ||
CLI | CLI - for most used or delaying command or process | ||
CLI are invoked by shell / terminal window | |||
A Linux distribution specialized for servers may use the CLI as its only interface. | |||
GUI | it is X- Window system. Based | ||
Gnome, KDE, CDE ( common Desktop environment) are X- window based | |||
X-Window system – which provide low level graphics on Linux as well as UNIX | |||
I guess, CDE used in Unix | |||
package manager | to install new or update or remove a software | ||
some major company have their linux | Dell, HP, IBM, Oracle, Novel and nokia, etc have their own distribution of linux | ||
usually company add their components along with linux kernal and distribute | |||
Even some company may extend core kernal | |||
since to sell their hardware they enhance Linux by some tool along with OS and sell | |||
Programming language | Most Linux distributions support dozens of programming languages | ||
he original development tools used for building both Linux applications and operating system programs are found within the GNU toolchain, which includes the GNU Compiler Collection (GCC) and the GNU build system. Amongst others, GCC provides compilers for Ada, C, C++, Java, and Fortran. | |||
the Low Level Virtual Machine project provides an alternate open-source compiler for many languages. Proprietary compilers for Linux include the Intel C++ Compiler, Sun Studio, and IBM XL C/C++ Compiler. BASIC in the form of Visual Basic is supported in such forms as Gambas, FreeBASIC, and XBasic. | |||
Most distributions also include support for PHP, Perl, Ruby, Python and other dynamic languages. While not as common, Linux also supports C# (via Mono), Vala, and Scheme. A number of Java Virtual Machines and development kits run on Linux, including the original Sun Microsystems JVM (HotSpot), and IBM's J2SE RE, as well as many open-source projects like Kaffe and JikesRVM | |||
GNOME and KDE are popular desktop environments and provide a framework for developing applications. These projects are based on the GTK+ and Qt widget toolkits, respectively, which can also be used independently of the larger framework. Both support a wide variety of languages. There are a number of Integrated development environments available including Anjuta, Code::Blocks, CodeLite, Eclipse, Geany, ActiveState Komodo, KDevelop, Lazarus, MonoDevelop, NetBeans, Qt Creator and Omnis Studio, while the long-established editors Vim and Emacs remain popular.[58] | |||
Uses | As well as those designed for general purpose use on desktops and servers, distributions may be specialized for different purposes including: computer architecture support, embedded systems, stability, security, localization to a specific region or language, targeting of specific user groups, support for real-time applications, or commitment to a given desktop environment. Furthermore, some distributions deliberately include only free software. Currently, over three hundred distributions are actively developed, with about a dozen distributions being most popular for general-purpose use | ||
Linux is a widely ported operating system kernel. The Linux kernel runs on a highly diverse range of computer architectures: in the hand-held ARM-based iPAQ and the mainframe IBM System z9, System z10; in devices ranging from mobile phones to supercomputers.[60] Specialized distributions exist for less mainstream architectures. The ELKS kernel fork can run on Intel 8086 or Intel 80286 16-bit microprocessors, while the µClinux kernel fork may run on systems without a memory management unit. The kernel also runs on architectures that were only ever intended to use a manufacturer-created operating system, such as Macintosh computers (with both PowerPC and Intel processors), PDAs, video game consoles, portable music players, and mobile phones. | |||
android | modified version of linux kernal |
5: Boot
POST test | ||
BIOS run from ROM | ||
Boot Loader running (LILO & GRUB ) | ||
Kernal loaded | ||
Init process running | ||
Linux has | LILO ( Linux Loader ) | it boot the system and allow to load either Linux or Windows or any other in command mode |
GRUB (GRand Unified Bootloader) | it boot the system and allow to load either Linux or Windows or any other in GUI mode | |
system wide | /etc/profile | it is system wide configuration file. It is read when login by shell |
/etc/inputrc | it is readline configuration file read at beging | |
/etc/profile.d/ | this directory has configuration file for specific program. Ex a script file to configure bash shell | |
/etc/bashrc | system wide configuration for bash shell | |
user's home | .profile | it is read once LOGIN ( ancestor ) to system and shell program start. It read by any shell when a user start |
.bash_profile or .profile | it run for LOGIN ( ancestor ) shell | |
.bash_login | it run for LOGIN ( ancestor ) shell | |
.bash_logout | Run when the LOGIN ( ancestor ) shell exit | |
.bashrc | it run startup of every CHILD shell ( bash shell ) |
6: Shell
session | |||
start session | |||
some sesion variable | |||
some script on startup | |||
Environment variable | |||
Historty of shell | |||
sh | 1 | Bourne shell – which is earliest shell in unix | it is foremost and first shell with few capability |
Sh is default shell for initial release of UNIX | |||
sh is created by AT & T labs | |||
csh | 2 | CSH shell | it is written in c-language. So it is better for c-programmer |
Csh – has many features like job history, long running process, command history | |||
csh is enhanced of bourne (sh) shell | |||
mostly c-programmer prefer csh shell | |||
Csh is default/famous shell in berkely, BSD (open source flavours) Unix | |||
c shell Is open source | |||
TCSH shell | tcsh it is enhanced of csh ( c sheel ) | ||
it is also callled Turbo-C shell | |||
3 | |||
ksh | 4 | Ksh – korn shell ( Bourne + csh ) | which enhanced Bourne shell with tcsh shell features |
in my citi project i am using korn shell | |||
ksh is default/famous shell later release of (System V )UNIX. | |||
Almost it is competitor for C-shell | |||
ksh is created by AT & T labs | |||
ksh is available ONLY commercial version of unix like solaris, HP-UX, AIX | |||
bash | 4 | Bash shell ( Bourne + csh + ksh ) | it is rewritten Bourne shell by Free Software Foundation |
bash shell is de-facto shell in linux | |||
bash shell have all features of earlier shell like Bourne (sh) , csh, ksh features ) | |||
bash and ksh is enhanced version of sh(Bourne) shell | |||
my decisision | Bourne (sh), korn shell are commercial release of Unix and its flavour | ||
bash, c shell are open source whell in both unix and linux | |||
for safe, I should familiar with both Korn shell as well as bash shell | |||
zsh | 5 | Zsh - shell – like ksh shell | it is default in MacOs |
it has sh, ksh and bash features | |||
shell | |||
it get command | |||
by terminal | |||
by file ( shell script ) | |||
when load | by standard input | ||
it read /etc/profile | |||
.~profile | |||
$ENV (sh shell) / $BASH_ENV ( bash shell ) | |||
switch shell | |||
just type name of shell to switch to another shell | |||
the default shell of current user specified in /etc/passwd file | |||
common shell featurs | |||
command line editing ( like vi ) | |||
command history | |||
executing commands | |||
job control | |||
shell functions and alias | shell function a way to group commands | ||
indexed array | |||
arithmetic | |||
Aliases | |||
shell variable declaration | |||
shell expension | |||
redirection | |||
wild card support ( * ? ) | |||
name completion( tab ) | |||
built in commands ( true, false, test, { | |||
interactive shell | |||
it read and write in user terminal | |||
when a bash shell invoked without any option, by default it is interactive mode | |||
shell execute a command as process | |||
shell execute internal command not as a separate process | |||
root user rep. # | |||
normal user $ | |||
home directory ~ | |||
Ctrl + W | to erase a word entered in terminal | ||
Ctrl + Z | to stop a executing command | ||
Ctrl + C | to stop a non-responding command |
7: Package
RPM | Red Hat Package manager | yum | ||||
DBM | Debian/GNU Linux Package Manager | Apt (The Advanced Package Tool (APT) | aptitude | synaptic | dselect | dpkg |
dependency | it is just set of library. Like jar files used in java | |||||
packages | it is a linux application /tool | package may be either source or binary files | ||||
singnature verification tool | GPG, PGP, MD5 | |||||
dd |
8: Editors
Vi | it is available in all unix. Like notepad in windows. So get familiar, even we use eclipse for development |
it is editor within terminal window itself | |
i think, it is best to use only for some configuration changes or small changes in programme. | |
for application development use some other Emacs / eclipse editor ( my idea ) | |
A number of enhanced versions of Vi exist, including nvi, vim, vile, and elvis | |
Ex | same like vi |
Vim | it is available in all falvour linux. Extend version of vi |
Emacs | it best for programming ( i guess ) |
it support many . | |
it support vi mode | |
sed | Stream Editor |
it is text processing tool | |
it is not interactive | |
it is script based editor |
9: doubt
what are the different type of stream editor other than ( sed, gwak, cut) and which is mostly used among them | |
tr | |
need usage of VI editor | |
need usage of Regular expression | |
need usage of sed | |
sed is commend. But it is always disccused with esp. in shell script book | |
how u often u use function file | |
tell me debug technique, like go backward to find error | |
tell more about autosys job definition, | |
terminal type ( vt100, sun, xterm, xterms ) ? | |
to linux familiar | commands and its set of options |
shell script development | |
environment variable handling | |
install/ uninstall packages | |
configuring packages ( mostly servers, db, I guess ) | |
commands | |
administrative commands | |
normal user commands | |
tools/application/package specific commands |
10: linix init process
init process | |
it load all the deamon process located on /etc/init.d folder | |
it read /etc/rc.sysinit file | |
it run all scripts acording its runlevel in /etc/rc?.d/ scripts LINK | |
inittab | |
it has default run-level |
11: Deamon process
sample deamon process | |
system log deamaon | |
power management demaon | |
name and mail deamon |
12: Bash shell
bash mode | |
interactive mode | |
restricted mode | |
POSIX compliant | |
Shell command group | |
shell function | |
shell built-in | |
exiting command from our file system ( directory ) | |
version | bash –version |
13: Dirctory structure
Nested( other than child of / ) folder sturcture may vary among different linux flavour | ||
/bin | it is having basic commands ( binary files ) | these are the programs that your system absolutely must have to run |
/sbin | system binary files ( administrator / system maintainance command ) | these are more programs that the system needs, but many of them can only be used by “root.” |
/lib | it is library files used by /bin and /sbin commands/binares | this is where Linux stores the libraries for basic tasks that it handles |
/usr | essentially, this is the “Program Files” of Linux. Programs, libraries and graphics for programs not essential to run Linux are stored here | |
/usr/lib | it is library files used by /usr/bin and /usr/sbin commands/binares | |
/usr/sbin | it also have some of system binary | |
/usr/bin | minimum no. Of command installed in this location | |
/usr/local | it installation of user software directory | eclipse, apache software |
/usr/share | it having man, info and other documentation of system /application/ utility | |
/etc | store all configuration files and startup/shutdown script | these are the configuration files for the system. This folder is where Linux sets how things should be run and when |
/dev | for harddisk, usb and all other devices ATTACHED to system | all the hardware on your system is catalogued here so that Linux knows what hardware you have and how to reach that hardware |
/mnt | Temporary mount directory to mount for sysadmin | this is another place where drives may be mounted |
/media | temporary mount directory to mount for USB, CD-ROM, CD-Recorder | this is where the system mounts other drives to by default. |
/proc | it is pesedo/virtual file system, available only in Memory. Hold information in text format about running process and kernel | this is for process status files, so that Linux knows what’s being worked on and what hardware is being used |
/srv | it contain service related data. Like CVS data for CVS service | CVS, FTP, HTTP, etc .files relating to a few services exposed as servers |
/var | set of data files like mail files, database files, log files supposed to grow its size | |
/tmp | tempory files for system and user . It will be deleted while reboot | |
/lost+found | file those are lost its directory structure, are moved into this folder by fsck commad running | this is where files that are recovered by the system during maintenance are placed |
/home | user's personal folder ( normal user can install his application here ) | it is equavalent to windows “My Documents” |
/opt | Add-on application by vendor ( different linux flavour ) | having gnome, kde related files. this is for “optional” software, which could really be anything. |
/sys | Kernel, Firmware and system related files | system information |
/boot | these are the files Linux uses when it boots up | Grub or Lilo, the Kernel, initrd and system.map config files |
/run |
14: 13
in windows file path start with drive like c:,d: |
in linux file path start with /folder/folder/file.ext |
files and folder names are case senstiive |
15: Env_ Variable
it is folder path, in which shell search for given command | PATH |
man path | MANPATH |
display the current ( default ) shell and its installed directory | SHELL |
it is display history of command. ( BASH & SH ) | HISTSIZE |
no. character to display in shell window | COLUMNS |
no. text line to display in shell window | LINES |
used by X client ( GUI application) to connect X server | DISPLAY |
display the computer name | HOSTNAME |
current directory | PWD |
display the user name | USER / USERNAME |
user home directory | HOME |
current locale name | LANG |
16: Autosys
Autosys | ||
create, monitor and report jobs | ||
any thing that can be run in shell can be configured as job | ||
autosys server and client | ||
job can configured via GUI & JIL file ( citi use JIL file ) | ||
server component | event server ( event database ) | it store all the job, report and etc information |
event Processor ( a deamon process, read event db ) | he is run all the job | |
remote agent | it run only if a job has to be run in remote mechine to event server | |
help | 0 | |
0 | ||
job definition parameter | profile | |
starting time | ||
time zone | ||
starting condition | ||
job name ( insert_job, update_job ) | ||
job type ( c – child, b- box, f – watch file ) | ||
owner | ||
Command / shell script file | ||
Machine ( client machine, in which the command runs ) | ||
date_condition | ||
day_of_week | ||
box job type | it is logical group of job which are all take same parameter or start condition | |
job definition types | ||
AutoSys Graphical User Interface (GUI) | used to save a job defintion in event server | |
AutoSys Job Information Language (JIL) | used to save a job defintion in event server | |
some command for autosys | ||
Jil < --jil file name-- | ||
Sendevnet -E | FORCE_STARTJOB -J | |
STARTJOB -J | ||
OFF_ICE -J | ||
ON_ICE -J | ||
JOB_ON_ICE | ||
JOB_OFF_ICE | ||
JOB_ON_HOLD | ||
JOB_OFF_HOLD | ||
KILLJOB -J | ||
autorep -j <jobName> | ||
chk_auto_up | ||
autoping |