37
Linux Linux

Linux

Embed Size (px)

DESCRIPTION

a lecture about Linux OS

Citation preview

Page 1: Linux

Linux Linux

Page 2: Linux

Key Notes

Introduction to Open Source. What is Linux. Linux Distros. Which is Suitable for Me. Linux Installation Process. How to Use Linux. Installing Useful Software. Linux Shells (Advanced).

Page 3: Linux

Open Source

Is a development methodology. Means that people can share their programs

source code with every one for free. This type of software is available under terms of

licenses such as GPL, LGPL, AGPL, ISC, MIT. Each license puts some rules for the method of

using their code. Most famous one is the GPL license used with

Linux.

Page 4: Linux

Open Source & Linux

Unix was the Major used OS in most universities.

Unix started asking students to pay money for the usage and development of the system.

A professor developed Minix in order to replace Unix, which was used by Linus Torvalds.

Linus started to develop the Linux Kernel. In the same time Ritchard Stallman started to

develop GNU and constructed Free Software Foundation.

Page 5: Linux

What is Linux?

Linux is a free open source operating system kernel built by a student to replace UNIX.

Linux is the system kernel where GNU is the tools that system use to operate.

It was developed in early 1990s but still developed until now.

Is the first choice for enterprise world and geeks.

Linux can run on many platforms(i386, x86/64, PPC, Amiga, SPARC, PS3, Super computers).

Page 6: Linux

GNU/Linux Architecture

Linux has a monolithic kernel. GNU/Linux uses the structure of layered model.

KernelProcess control

Networking PeripheralsFile

System

Unix Tools

X Server (X window system)

Unix Shells

Page 7: Linux

Linux Window Managers.

Window managers is a graphical software used to ease the use of the system.

Linux has many window managers (KDE, Gnome, xpde, xfce, fluxbox, twm, NextStep,....).

Page 8: Linux

Screen shots for WMs

Page 9: Linux

Linux Distros.

As Linux is open source so any one can develop his own version.

Linux distros varies in DWM, Applications provided with each.

Market imposed on us some distros as standard (Redhat, Debian, Slackware).

Most of current distros are based on Debian(Ubuntu) or Redhat (Fedora).

Page 10: Linux

Fedora Desktop

Page 11: Linux

Ubuntu Desktop

Page 12: Linux

Which is Suitable for Me?

Redhat is good for enterprise work. Debian is good for professional end-users. Fedora is good for personal use and developing Opensuse is good for training usage Mandriva is very good for non technical user. Slackware is intended for Advanced

professional users. Ubuntu is suitable for ALL !!!

Page 13: Linux

Why Ubuntu?

Ubuntu is a free Linux distros Ubuntu is based on Debian which is reliable

and stable. Ubuntu is the distribution with the biggest

software repositories. Ubuntu has a good hardware support for most

available companies. Ubuntu have a lot of variants (Kubuntu,

Xubuntu, Edubuntu, Goubuntu, MIDI Ubuntu).

Page 14: Linux

Ubuntu is Widely Used

Page 15: Linux

Installing Ubuntu

Ubuntu comes on a live CD. Live CD means that you can use the system

from CD with out installing (boot only). The system installation is as easy as installing

a program (Only double click on icon). The installation process is very fast and easy

(faster and easier than installing windows). Let's see how ???!!

Page 16: Linux

First Welcome Screen

Page 17: Linux

Choose your Language.

Page 18: Linux

Choose your Location

Page 19: Linux

Choose Keyboard Layout

Page 20: Linux

Prepare Disk Space

Page 21: Linux

Who are you?

Page 22: Linux

Import Windows® Settings

Page 23: Linux

Booting After Installition

Page 24: Linux

Login Screen

Page 25: Linux

Using Linux

Linux desktop is very easy to use like windows. There are some important elements on desktop

Computer Disks: Places → Computer. Home Directory : Places → Home Folder. Configurations : System → Preferences. Administration : System → Administration. All Programs : Applications → Choose Category.

Note that all this menus are found under Gnome only KDE is different.

Page 26: Linux

Using Linux (File System)

Linux uses EXT2, EXT3 file systems and a swap partition to use as virtual memory.

Linux can mount FAT16/32 , NTFS , HFS Drives where windows can't mount EXT drive.

Under File system there are some Directories: /bin: contains UNIX tools and executable Shell tools /boot: file needed to boot the system. /etc: system configuration files. /lib : system and applications libraries. /media: mounted drives.

Page 27: Linux

Installing Useful Software

Most of applications available for Linux are free and open source so it's easy to get.

Linux has repositories for programs (search & get).

Each Linux distribution has a software called package manager.

The two most famous packages formats are: .deb for Debian based system , .rpm for Redhat based systems.

Page 28: Linux

How to Install Applications?

From Application menu go to Add/Remove..... In the windows opened write program name or

description in the search field. choose your preferred programs. Click “Apply” and wait for download and instillation. Now the program is installed and ready to use.

To install application from shell. sudo apt-get install packageName Then wait for download and installation.

Page 29: Linux

Windows Emulation

WINE is a windows emulator which is able to run windows software under Linux.

Wine can be downloaded via Add/Remove.. WINE can emulate windows (2.0, 3.0, 95, 98,

NT, 2000, XP, Server 2003, Vista, Server 2008) Wine Doors is a program that downloads some

libraries for WINE to be compatible with most windows Apps.

Wine needs (MFC , VC++ runtime, VB runtime, IE6 libs, DX9c libs, .....).

Page 30: Linux

Programming on Linux.

Linux has dozens of programming languages. GNU Compilers Collection has compilers for:

Ada, C/C++, Fortran and Java.

The Linux kernel is compiled using GCC. Perl, Python are installed on most distros. Sun's JDK, JVM can be installed on Linux. A lot of IDEs are available for Linux(Eclipse,

Netbeans, Mono, KDevelop, Omnis Studio)

Page 31: Linux

Installing Java & Netbeans

To install Sun Java write this commands: sudo apt-get install sun-java6-jre sudo apt-get install sun-java6-bin sudo apt-get install sun-java6-jdk sudo apt-get install sun-java6-plugin

To install Netbeans download the Linux file then: Double click the Icon and continue the setup. ./netbeans6.x --javahome:JavaDirectoryPath

Page 32: Linux

Installing MySQL & Oracle

MySQL server must be installed using package manager: sudo apt-get install mysql-server-5.0 Query browser and other tools can be downloaded via

Add/Remove from Applications menu. Download the Oracle deb package from Oracle

website then: Double click on the icon. Click on install package button and wait for setup to

finish. Go to /etc/init.d then write “chmod +x oracle-xe” Then start script as root “sudo ./oracle-xe”

Page 33: Linux

Linux Shells (UNIX shells)

Linux uses shells to interact with user in CLI mode (good for servers and administrators).

Shells can be accessed by GUI users via terminals.

Linux shell is similar to UNIX shell but with some additional commands.

Most popular Linux shell is Bash. Bash supports scripts with a wide range of

commands.

Page 34: Linux

Linux Shell Commands

cp file1 file2 → copy file1 to file2

rm fileName → deletes the file.

mv file1 file2 → rename file1 or moves it to another location.

cd directoryName → change directory.

less fileName → view file content

clear → clear screen

man command → view command Manual.

find fileName → search for file.

Page 35: Linux

Linux Shell Commands 2

ls → list files in current directory.

ps -u UserName → view all running process for userName.

kill PID → kill process with a specific ID.

su → change to root mode.

sudo “command” → execute command in root mode.

chmod +x “file” → change file mode to executable.

./script.xyz → execute script or file.

ifconfig → view your network interface configurations.

history → view history of command you entered.

reboot → restart system , halt → shutdown the system

Page 36: Linux

Shell Configurations

The shell configurations file of the Bash shell is found under /home/UseName/.bashrc .

We can use this file to define new environment variables to the shell by adding the following line at the end of the file: PATH=$PATH:/xx/yy/zz; export PATH

.bash_history → contains your command history.

.bash_logout → execute command when leaving shell.

Page 37: Linux

Bye Bye

Keep Using