SlideShare ist ein Scribd-Unternehmen logo
1 von 25
LINUX
Linux Overview
SHELL
Directory Structure
Basic Commands
Text Editor for linux
User and Group Management
Permissions
GRUB
TAR file
RPM
Networking (Assign IP)
Hard Disk Management
LINUX
Linux is an operating system based on UNIX, and was first introduced by
Linus Torvalds commonly used in servers.
It is based on the Linux Kernel, and can run on different hardware platforms
manufactured by Intel, MIPS, HP, IBM, SPARC and Motorola. Another
popular element in Linux is its mascot, a penguin figure named Tux.
‱ It’s free and available in open source.
Open source: Open source is a platform that allows you to distribute your
software, including source codes freely to anyone who is interested. People
would then be able to add features and even debug and correct errors that
are in the source code. They can make it run better by adding some new
features and then redistributes these enhanced source code freely again.
This eventually benefits everyone in the community.
SHELL
The shell is a program that takes keyboard commands and passes them to the operating
system to carry out. Almost all Linux distributions supply a shell program from the GNU
project called BASH.
BASH: the name “BASH” acronym for “Bourne Again Shell”. It was written by Steve
Bourne as a replacement to the original Bourne Shell (represented by /bin/sh). It
combines all the features from the original version of Bourne Shell, plus additional
function to make it easier and more convenient to use. It has since been adapted as the
default shell for the most system running shell.
Terminal Emulators: When using a graphical user interface we need another program
called a terminal emulator to interact with the shell. It’s likely called simply “terminal”
on our menu.
Launch the terminal:
[root@localhost ~] #
This is called a shell prompt and it will appear whenever the shell is ready to accept
input.
Directory Structure
‱ /bin : normal command execution directory
‱ /sbin : administrative command execution directory
‱ /boot : boot loader directory it contains GRUB
‱ /etc : configuration file directory
‱ /proc : current process info directory
‱ /media: external media device mount point
‱ /mnt : network or local mount point
‱ /opt : third party software installation directory
‱ /usr : entire installation and own software installation directory
‱ /lost+found : recovery directory
‱ /selinux : security directory
‱ /var : log directory
‱ /root : root user home directory
‱ /home: normal user home directory
In Linux “/”
work as a
drive, as C:
in Windows
BASIC Commands
Generally we use two prompts in Linux :
1. # : root user (Administrative authentication)
2. $ : normal user (restricted authentication)
# ls
List command to show the content of directory
# ls -l
To get detailed list of directory content
# ls -a
To get the list of all file/dir including hidden object.
# pwd
Print working directory
# mkdir <dirname>
To create a directory
Structure of command in Linux:
# <command> - <option> <arguments> [* always use “–” before option]
BASIC Commands
# mkdir -p <dir1>/<dir2>/<dir_n>
To create parent directory
# mkdir <dir> <dir2> <dir_n>
To create multiple directory
# touch <filename>
To create a new file
# touch <file1> <file2> <file_n>
To create multiple file
# cd <dir name>
To change directory
# cd ..
To close any directory
# cat <file name>
To view the data of any file
BASIC Commands
# cat > <file name>
To input data in file with input mode
# cat >> <file name>
To input data in file with append mode
# rm -r <file/dir name>
To delete file/dir
# rm -rf <file/dir name>
To delete file/dir forcefully
# cp -rv <source> <destination>
To copy file/dir and paste
# mv <source> <destination>
To move/cut a file/dir and paste
# man <command name>
To get the help of command
BASIC Commands
# <command name> --help
To get brief details of command
# which <command name>
To get the location of command execution
# who
To get the info of logged-in user
# halt
To shutdown
# reboot
To restart
Text Editor
Text editor is a software to create or edit text files.
Text editor can be GUI and CLI.
GUI text editor used in Linux:
1. Gedit
2. Leafpad
CLI text editor used in Linux:
1. Vi
2. Vim
3. Nano
4. emacs
VI (Visual Editor)
vi or vim is a terminal text editor.
Commands:
# vim <file name>
To create or edit existing file
Text Editor
There are three modes in vi editor
1. Command mode (default mode)
2. Insert mode
3. EX mode
1. Command Mode (ESC) : It is used to do cut, copy, paste.
yy : to copy a line
<num> yy : to copy multiple lines
yw : to copy a word
dd : to cut a line
D : to delete a line
<num>D : to delete multiple lines
<num>dd : to cut multiple lines
dw : to cut a word
p : to paste
Text Editor
2. Insert Mode (to enter in insert mode press i or a)
data input or edit mode.
3. EX mode (to enter in EX mode press ESC then SHIFT + : )
This mode is used for file saving and quieting.
: w : to save
: q : to quit
: wq : to save and quit
: w! : to save forcefully
: q! : to quite forcefully
:/<find word> : to search any word
:;%s/<find word>/<replace word>/g : to replace any word
: set nu : to set line number
: set nonu : to unset line number
User Group Management
User : Users are the login account through which we can access
the resources and features of an operating system.
Group : Groups are the place where user accounts are placed for
security and policy implementation.
Important file locations:
/etc/passwd : users details file
/etc/shadow : users encrypted password file
/etc/group : groups details file
Commands:
# groupadd <group name>
To create new group
# useradd <user name>
To create new user
User Group Management
# passwd <user name>
To create or change user password
# useradd -g <primary group> -G <sec group1> <sec group2>
<username>
To create a user with specific primary group and secondary group.
[-g : Primary group, -G : Secondary group]
# usermod -g <groupname> <existing name>
To modify primary group name
# usermod -G <groupname1>,<groupname2> <existing user name>
To change or modify secondary group
# useradd -d “directory name with location” <user name>
To give a new home directory
# useradd -c “comment” -g <groupname> <username>
To give comment for a user
# usermod -c “comment” <user name>
To change or modify user comment
User Group Management
root : x : 0 : 0 : root : /root : /bin/bash
root : user name
x : link to shadow file
0 : user ID
0 : Group (primary) ID
root : comment of user
/root : home directory of user
/bin/bash : user shell
# useradd -s /sbin/nologin <username>
To create no-login user
# userdel -r <user name>
To delete user
# groupdel <group name>
To delete group (firstly delete group members)
Permissions
It is used to implement access control on objects (files and dir) of operating
system.
There are three permission in Linux
1. Read r 4
2. Write w 2
3. Execute x 1
# ls -l or ll
To check the permissions of any file/dir
# chmod UGO <file/dir>
To give or change permissions
# chmod -R UGO <file/dir>
To give or change permissions of sub file/dir (parent file/dir)
Each objects (file/dir) have three pairs of permissions
Like: rwx rwx rwx
user group others
Permissions
# chmod -R <user>:<group> <file/dir>
To change the ownership
Default permission
Root User:
File : 644
Dir : 755
User home dir : 700
Normal User:
File : 664
Dir : 775
GRUB
It is the boot loader for the linux. GRUB is short for GNU Grand Unified Boot
Loader.
Location of Grub file is :
/boot/grub/grub.conf : Original file
/etc/grub.conf : shortcut file
We can reset boot user password using two methods:
1. Single user mode (Using grub menu)
2. Rescue mode (Using linux DVD)
# grub-md5-crypt : to create encrypted password
TAR (Tap Archiver)
It is used for making TAR and compressed file. It is like making zip file and
rar files in windows. It also considered as backup and restore method.
Commands:
# tar -cvf <output.tar> <input folder>
To create a tar file
# tar -tvf <filename.tar>
To check the contents of tar file
# tar -xvf <filename.tar>
To extract the contents of tar or compressed file
# tar -zcvf <output.tar.gz> <input.tar>
To create compressed tar file
# tar -jcvf <output.tar.bz2> <input.tar>
To create compressed .bz2 tar file
RPM (Redhat Package Manager)
RPM is used to install packages in Redhat Linux OS. The extension of
Redhat Linux package is .rpm like .exe in windows.
Note: RPM command do not resolve dependency packages automatically.
Commands:
# rpm -ivh <packagename.rpm>
To install package
# rpm -e <software name>
To uninstall package/software
# rpm -qa
To get the list of all installed software
# rpm -qa grep <keyword>
To get the list of installed software using filter
# rpm -qi <softwarename>
To get info of all installed software
RPM (Redhat Package Manager)
# rpm -ql <software name>
To get the list of file/dir copied to system and its location by package
# rpm -qf <file/dir name>
To know the responsible package name of file/dir
# rpm -ivh --force --nodeps --aid <package name>
To install any package forcefully
Networking
It is assign used to assign IP address in our OS.
We can assign IP in two ways
1. Temporary IP setting
2. Permanent IP setting (using manual and DHCP)
Commands:
# ifconfig
To check the IP address and interface
# ifup <interface name>
To enable LAN interface
# ifdown <interface name>
To disable LAN interface
# hostname
To check the hostname of computer
Networking
# hostname <newhostname>
To change the hostname
# ifconfig <interface> <ipadress>
To assign IP
# route add default gw <gateway IP>
To assign gateway IP
# vim /etc/resolv.conf
nameserver <DNS1 IP>
nameserver <DNS2 IP> : to assign DNS IP
:wq
 Temporary IP setting
 Permanent IP setting
# system-config-network
To assign IP, Netmask, Gateway, Hostname, DNS1, DNS2 etc.
# service network restart
To restart the service of network
Networking
Important Files:
 /etc/sysconfig/network-scripts/ifcfg - <interface>
This file contains IP, Netmask, Gateway, MAC etc
 /etc/sysconfig/network
This file contains hostname
 /etc/resolv.conf
This file contains DNS IP
 /etc/hosts
Local DNS entry file
Harddisk Management
It is used to configure and maintain HDD partitions, volumes and file system in Linux
Commands used in HDD management
# fdisk -l
# fdisk <hdd file name>
To enter in HDD management mode
Commands used in HDD management mode:
: m : for all command and details
To check the partition table and HDD details
: p : for print current partition table
: n : to create new partition or volumes
: t : to change file system table
: l : to list file system hex code
: d : to delete a partition
: w : to save and quit
: q : to quit without saving
# mkfs.ext4 <partition_name>
To format Linux partition
After any
changes done
using fdisk
command,
Restart is
compulsary
# mkfs.vfat <partition_name>
To format windows partition in Linux

Weitere Àhnliche Inhalte

Was ist angesagt?

Linux presentation
Linux presentationLinux presentation
Linux presentationNikhil Jain
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Scriptsbmguys
 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internalsmukul bhardwaj
 
Introduction 2 linux
Introduction 2 linuxIntroduction 2 linux
Introduction 2 linuxPapu Kumar
 
Linux standard file system
Linux standard file systemLinux standard file system
Linux standard file systemTaaanu01
 
Users and groups in Linux
Users and groups in LinuxUsers and groups in Linux
Users and groups in LinuxKnoldus Inc.
 
Bash shell scripting
Bash shell scriptingBash shell scripting
Bash shell scriptingVIKAS TIWARI
 
Linux User Management
Linux User ManagementLinux User Management
Linux User ManagementGaurav Mishra
 
Linux Introduction (Commands)
Linux Introduction (Commands)Linux Introduction (Commands)
Linux Introduction (Commands)anandvaidya
 
Linux file system
Linux file systemLinux file system
Linux file systemBurhan Abbasi
 
Shell scripting
Shell scriptingShell scripting
Shell scriptingsimha.dev.lin
 
Server configuration
Server configurationServer configuration
Server configurationAisha Talat
 
Access control list acl - permissions in linux
Access control list acl  - permissions in linuxAccess control list acl  - permissions in linux
Access control list acl - permissions in linuxSreenatha Reddy K R
 

Was ist angesagt? (20)

Linux presentation
Linux presentationLinux presentation
Linux presentation
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Script
 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internals
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Basic 50 linus command
Basic 50 linus commandBasic 50 linus command
Basic 50 linus command
 
Introduction 2 linux
Introduction 2 linuxIntroduction 2 linux
Introduction 2 linux
 
Linux introduction
Linux introductionLinux introduction
Linux introduction
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Linux standard file system
Linux standard file systemLinux standard file system
Linux standard file system
 
Linux
Linux Linux
Linux
 
Users and groups in Linux
Users and groups in LinuxUsers and groups in Linux
Users and groups in Linux
 
Bash shell scripting
Bash shell scriptingBash shell scripting
Bash shell scripting
 
Linux User Management
Linux User ManagementLinux User Management
Linux User Management
 
Linux Introduction (Commands)
Linux Introduction (Commands)Linux Introduction (Commands)
Linux Introduction (Commands)
 
Linux basics
Linux basicsLinux basics
Linux basics
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Linux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell ScriptingLinux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell Scripting
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
 
Server configuration
Server configurationServer configuration
Server configuration
 
Access control list acl - permissions in linux
Access control list acl  - permissions in linuxAccess control list acl  - permissions in linux
Access control list acl - permissions in linux
 

Andere mochten auch

Basic Linux day 2
Basic Linux day 2Basic Linux day 2
Basic Linux day 2Saikumar Daram
 
Evaluation_2013_2014
Evaluation_2013_2014Evaluation_2013_2014
Evaluation_2013_2014Alexis Perry
 
Introduction to tcp ip linux networking
Introduction to tcp ip   linux networkingIntroduction to tcp ip   linux networking
Introduction to tcp ip linux networkingSreenatha Reddy K R
 
Basic commands of linux
Basic commands of linuxBasic commands of linux
Basic commands of linuxshravan saini
 
Linux Basic Commands
Linux Basic CommandsLinux Basic Commands
Linux Basic CommandsHanan Nmr
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structureSreenatha Reddy K R
 
Osi , tcp/ip protocol and Addressing
Osi , tcp/ip protocol and Addressing Osi , tcp/ip protocol and Addressing
Osi , tcp/ip protocol and Addressing marwan aldulaimy
 
Basic android-ppt
Basic android-pptBasic android-ppt
Basic android-pptSrijib Roy
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commandsShakeel Shafiq
 
Comparison and Contrast between OSI and TCP/IP Model
Comparison and Contrast between OSI and TCP/IP ModelComparison and Contrast between OSI and TCP/IP Model
Comparison and Contrast between OSI and TCP/IP ModelConferencias FIST
 
Basic command ppt
Basic command pptBasic command ppt
Basic command pptRohit Kumar
 
Introduction to Linux OS
Introduction to Linux OSIntroduction to Linux OS
Introduction to Linux OSMohammed Safwat
 
Osi model
Osi modelOsi model
Osi modelOnline
 
An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to Linuxanandvaidya
 
Android seminar-presentation
Android seminar-presentationAndroid seminar-presentation
Android seminar-presentationconnectshilpa
 
Introduction to linux ppt
Introduction to linux pptIntroduction to linux ppt
Introduction to linux pptOmi Vichare
 
Android ppt
Android pptAndroid ppt
Android pptsrikanth982
 
Osi model vs TCP/IP
Osi model vs TCP/IPOsi model vs TCP/IP
Osi model vs TCP/IPMannu Khani
 
TCP/IP Basics
TCP/IP BasicsTCP/IP Basics
TCP/IP Basicssanjoysanyal
 

Andere mochten auch (20)

Basic Linux day 2
Basic Linux day 2Basic Linux day 2
Basic Linux day 2
 
Evaluation_2013_2014
Evaluation_2013_2014Evaluation_2013_2014
Evaluation_2013_2014
 
Introduction to tcp ip linux networking
Introduction to tcp ip   linux networkingIntroduction to tcp ip   linux networking
Introduction to tcp ip linux networking
 
Basic commands of linux
Basic commands of linuxBasic commands of linux
Basic commands of linux
 
Linux Basic Commands
Linux Basic CommandsLinux Basic Commands
Linux Basic Commands
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structure
 
Osi , tcp/ip protocol and Addressing
Osi , tcp/ip protocol and Addressing Osi , tcp/ip protocol and Addressing
Osi , tcp/ip protocol and Addressing
 
Basic android-ppt
Basic android-pptBasic android-ppt
Basic android-ppt
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
 
Comparison and Contrast between OSI and TCP/IP Model
Comparison and Contrast between OSI and TCP/IP ModelComparison and Contrast between OSI and TCP/IP Model
Comparison and Contrast between OSI and TCP/IP Model
 
Basic command ppt
Basic command pptBasic command ppt
Basic command ppt
 
Introduction to Linux OS
Introduction to Linux OSIntroduction to Linux OS
Introduction to Linux OS
 
Osi model
Osi modelOsi model
Osi model
 
Osi model
Osi modelOsi model
Osi model
 
An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to Linux
 
Android seminar-presentation
Android seminar-presentationAndroid seminar-presentation
Android seminar-presentation
 
Introduction to linux ppt
Introduction to linux pptIntroduction to linux ppt
Introduction to linux ppt
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Osi model vs TCP/IP
Osi model vs TCP/IPOsi model vs TCP/IP
Osi model vs TCP/IP
 
TCP/IP Basics
TCP/IP BasicsTCP/IP Basics
TCP/IP Basics
 

Ähnlich wie Linux basics part 1

Linux Presentation
Linux PresentationLinux Presentation
Linux PresentationMuhammad Qazi
 
Introduction to Linux
Introduction to Linux Introduction to Linux
Introduction to Linux Harish R
 
Devops for beginners
Devops for beginnersDevops for beginners
Devops for beginnersVivek Parihar
 
Solaris basics
Solaris basicsSolaris basics
Solaris basicsAshwin Pawar
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to UnixSudharsan S
 
Linux Getting Started
Linux Getting StartedLinux Getting Started
Linux Getting StartedAngus Li
 
Unix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptxUnix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptxRajesh Kumar
 
Linux week 2
Linux week 2Linux week 2
Linux week 2Vinoth Sn
 
Most frequently used unix commands for database administrator
Most frequently used unix commands for database administratorMost frequently used unix commands for database administrator
Most frequently used unix commands for database administratorDinesh jaisankar
 
Rhel 6.2 complete ebook
Rhel 6.2 complete ebookRhel 6.2 complete ebook
Rhel 6.2 complete ebookYash Gulati
 
Rhel 6.2 complete ebook
Rhel 6.2  complete ebookRhel 6.2  complete ebook
Rhel 6.2 complete ebookYash Gulati
 
Linux command line cheatsheet
Linux command line cheatsheetLinux command line cheatsheet
Linux command line cheatsheetWe Ihaveapc
 
Common linux ubuntu commands overview
Common linux  ubuntu commands overviewCommon linux  ubuntu commands overview
Common linux ubuntu commands overviewAmeer Sameer
 
Linux And perl
Linux And perlLinux And perl
Linux And perlSagar Kumar
 
Learning Linux v2.1
Learning Linux v2.1Learning Linux v2.1
Learning Linux v2.1sdiviney
 

Ähnlich wie Linux basics part 1 (20)

Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
Introduction to Linux
Introduction to Linux Introduction to Linux
Introduction to Linux
 
Devops for beginners
Devops for beginnersDevops for beginners
Devops for beginners
 
Solaris basics
Solaris basicsSolaris basics
Solaris basics
 
Linux
LinuxLinux
Linux
 
Rhel1
Rhel1Rhel1
Rhel1
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
 
Linux Getting Started
Linux Getting StartedLinux Getting Started
Linux Getting Started
 
Unix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptxUnix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptx
 
Linux week 2
Linux week 2Linux week 2
Linux week 2
 
Most frequently used unix commands for database administrator
Most frequently used unix commands for database administratorMost frequently used unix commands for database administrator
Most frequently used unix commands for database administrator
 
Linux basic
Linux basicLinux basic
Linux basic
 
Rhel 6.2 complete ebook
Rhel 6.2 complete ebookRhel 6.2 complete ebook
Rhel 6.2 complete ebook
 
Basics of Linux
Basics of LinuxBasics of Linux
Basics of Linux
 
Rhel 6.2 complete ebook
Rhel 6.2  complete ebookRhel 6.2  complete ebook
Rhel 6.2 complete ebook
 
Linux filesystemhierarchy
Linux filesystemhierarchyLinux filesystemhierarchy
Linux filesystemhierarchy
 
Linux command line cheatsheet
Linux command line cheatsheetLinux command line cheatsheet
Linux command line cheatsheet
 
Common linux ubuntu commands overview
Common linux  ubuntu commands overviewCommon linux  ubuntu commands overview
Common linux ubuntu commands overview
 
Linux And perl
Linux And perlLinux And perl
Linux And perl
 
Learning Linux v2.1
Learning Linux v2.1Learning Linux v2.1
Learning Linux v2.1
 

KĂŒrzlich hochgeladen

FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Visit to a blind student's school🧑‍🩯🧑‍🩯(community medicine)
Visit to a blind student's school🧑‍🩯🧑‍🩯(community medicine)Visit to a blind student's school🧑‍🩯🧑‍🩯(community medicine)
Visit to a blind student's school🧑‍🩯🧑‍🩯(community medicine)lakshayb543
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...SeĂĄn Kennedy
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
HỌC TỐT TIáșŸNG ANH 11 THEO CHÆŻÆ NG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIáșŸT - Cáșą NĂ...
HỌC TỐT TIáșŸNG ANH 11 THEO CHÆŻÆ NG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIáșŸT - Cáșą NĂ...HỌC TỐT TIáșŸNG ANH 11 THEO CHÆŻÆ NG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIáșŸT - Cáșą NĂ...
HỌC TỐT TIáșŸNG ANH 11 THEO CHÆŻÆ NG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIáșŸT - Cáșą NĂ...Nguyen Thanh Tu Collection
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxPoojaSen20
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
call girls in Kamla Market (DELHI) 🔝 >àŒ’9953330565🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïž
call girls in Kamla Market (DELHI) 🔝 >àŒ’9953330565🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïžcall girls in Kamla Market (DELHI) 🔝 >àŒ’9953330565🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïž
call girls in Kamla Market (DELHI) 🔝 >àŒ’9953330565🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïž9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 

KĂŒrzlich hochgeladen (20)

FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Visit to a blind student's school🧑‍🩯🧑‍🩯(community medicine)
Visit to a blind student's school🧑‍🩯🧑‍🩯(community medicine)Visit to a blind student's school🧑‍🩯🧑‍🩯(community medicine)
Visit to a blind student's school🧑‍🩯🧑‍🩯(community medicine)
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
HỌC TỐT TIáșŸNG ANH 11 THEO CHÆŻÆ NG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIáșŸT - Cáșą NĂ...
HỌC TỐT TIáșŸNG ANH 11 THEO CHÆŻÆ NG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIáșŸT - Cáșą NĂ...HỌC TỐT TIáșŸNG ANH 11 THEO CHÆŻÆ NG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIáșŸT - Cáșą NĂ...
HỌC TỐT TIáșŸNG ANH 11 THEO CHÆŻÆ NG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIáșŸT - Cáșą NĂ...
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
call girls in Kamla Market (DELHI) 🔝 >àŒ’9953330565🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïž
call girls in Kamla Market (DELHI) 🔝 >àŒ’9953330565🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïžcall girls in Kamla Market (DELHI) 🔝 >àŒ’9953330565🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïž
call girls in Kamla Market (DELHI) 🔝 >àŒ’9953330565🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïž
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 

Linux basics part 1

  • 1.
  • 2. LINUX Linux Overview SHELL Directory Structure Basic Commands Text Editor for linux User and Group Management Permissions GRUB TAR file RPM Networking (Assign IP) Hard Disk Management
  • 3. LINUX Linux is an operating system based on UNIX, and was first introduced by Linus Torvalds commonly used in servers. It is based on the Linux Kernel, and can run on different hardware platforms manufactured by Intel, MIPS, HP, IBM, SPARC and Motorola. Another popular element in Linux is its mascot, a penguin figure named Tux. ‱ It’s free and available in open source. Open source: Open source is a platform that allows you to distribute your software, including source codes freely to anyone who is interested. People would then be able to add features and even debug and correct errors that are in the source code. They can make it run better by adding some new features and then redistributes these enhanced source code freely again. This eventually benefits everyone in the community.
  • 4. SHELL The shell is a program that takes keyboard commands and passes them to the operating system to carry out. Almost all Linux distributions supply a shell program from the GNU project called BASH. BASH: the name “BASH” acronym for “Bourne Again Shell”. It was written by Steve Bourne as a replacement to the original Bourne Shell (represented by /bin/sh). It combines all the features from the original version of Bourne Shell, plus additional function to make it easier and more convenient to use. It has since been adapted as the default shell for the most system running shell. Terminal Emulators: When using a graphical user interface we need another program called a terminal emulator to interact with the shell. It’s likely called simply “terminal” on our menu. Launch the terminal: [root@localhost ~] # This is called a shell prompt and it will appear whenever the shell is ready to accept input.
  • 5. Directory Structure ‱ /bin : normal command execution directory ‱ /sbin : administrative command execution directory ‱ /boot : boot loader directory it contains GRUB ‱ /etc : configuration file directory ‱ /proc : current process info directory ‱ /media: external media device mount point ‱ /mnt : network or local mount point ‱ /opt : third party software installation directory ‱ /usr : entire installation and own software installation directory ‱ /lost+found : recovery directory ‱ /selinux : security directory ‱ /var : log directory ‱ /root : root user home directory ‱ /home: normal user home directory In Linux “/” work as a drive, as C: in Windows
  • 6. BASIC Commands Generally we use two prompts in Linux : 1. # : root user (Administrative authentication) 2. $ : normal user (restricted authentication) # ls List command to show the content of directory # ls -l To get detailed list of directory content # ls -a To get the list of all file/dir including hidden object. # pwd Print working directory # mkdir <dirname> To create a directory Structure of command in Linux: # <command> - <option> <arguments> [* always use “–” before option]
  • 7. BASIC Commands # mkdir -p <dir1>/<dir2>/<dir_n> To create parent directory # mkdir <dir> <dir2> <dir_n> To create multiple directory # touch <filename> To create a new file # touch <file1> <file2> <file_n> To create multiple file # cd <dir name> To change directory # cd .. To close any directory # cat <file name> To view the data of any file
  • 8. BASIC Commands # cat > <file name> To input data in file with input mode # cat >> <file name> To input data in file with append mode # rm -r <file/dir name> To delete file/dir # rm -rf <file/dir name> To delete file/dir forcefully # cp -rv <source> <destination> To copy file/dir and paste # mv <source> <destination> To move/cut a file/dir and paste # man <command name> To get the help of command
  • 9. BASIC Commands # <command name> --help To get brief details of command # which <command name> To get the location of command execution # who To get the info of logged-in user # halt To shutdown # reboot To restart
  • 10. Text Editor Text editor is a software to create or edit text files. Text editor can be GUI and CLI. GUI text editor used in Linux: 1. Gedit 2. Leafpad CLI text editor used in Linux: 1. Vi 2. Vim 3. Nano 4. emacs VI (Visual Editor) vi or vim is a terminal text editor. Commands: # vim <file name> To create or edit existing file
  • 11. Text Editor There are three modes in vi editor 1. Command mode (default mode) 2. Insert mode 3. EX mode 1. Command Mode (ESC) : It is used to do cut, copy, paste. yy : to copy a line <num> yy : to copy multiple lines yw : to copy a word dd : to cut a line D : to delete a line <num>D : to delete multiple lines <num>dd : to cut multiple lines dw : to cut a word p : to paste
  • 12. Text Editor 2. Insert Mode (to enter in insert mode press i or a) data input or edit mode. 3. EX mode (to enter in EX mode press ESC then SHIFT + : ) This mode is used for file saving and quieting. : w : to save : q : to quit : wq : to save and quit : w! : to save forcefully : q! : to quite forcefully :/<find word> : to search any word :;%s/<find word>/<replace word>/g : to replace any word : set nu : to set line number : set nonu : to unset line number
  • 13. User Group Management User : Users are the login account through which we can access the resources and features of an operating system. Group : Groups are the place where user accounts are placed for security and policy implementation. Important file locations: /etc/passwd : users details file /etc/shadow : users encrypted password file /etc/group : groups details file Commands: # groupadd <group name> To create new group # useradd <user name> To create new user
  • 14. User Group Management # passwd <user name> To create or change user password # useradd -g <primary group> -G <sec group1> <sec group2> <username> To create a user with specific primary group and secondary group. [-g : Primary group, -G : Secondary group] # usermod -g <groupname> <existing name> To modify primary group name # usermod -G <groupname1>,<groupname2> <existing user name> To change or modify secondary group # useradd -d “directory name with location” <user name> To give a new home directory # useradd -c “comment” -g <groupname> <username> To give comment for a user # usermod -c “comment” <user name> To change or modify user comment
  • 15. User Group Management root : x : 0 : 0 : root : /root : /bin/bash root : user name x : link to shadow file 0 : user ID 0 : Group (primary) ID root : comment of user /root : home directory of user /bin/bash : user shell # useradd -s /sbin/nologin <username> To create no-login user # userdel -r <user name> To delete user # groupdel <group name> To delete group (firstly delete group members)
  • 16. Permissions It is used to implement access control on objects (files and dir) of operating system. There are three permission in Linux 1. Read r 4 2. Write w 2 3. Execute x 1 # ls -l or ll To check the permissions of any file/dir # chmod UGO <file/dir> To give or change permissions # chmod -R UGO <file/dir> To give or change permissions of sub file/dir (parent file/dir) Each objects (file/dir) have three pairs of permissions Like: rwx rwx rwx user group others
  • 17. Permissions # chmod -R <user>:<group> <file/dir> To change the ownership Default permission Root User: File : 644 Dir : 755 User home dir : 700 Normal User: File : 664 Dir : 775
  • 18. GRUB It is the boot loader for the linux. GRUB is short for GNU Grand Unified Boot Loader. Location of Grub file is : /boot/grub/grub.conf : Original file /etc/grub.conf : shortcut file We can reset boot user password using two methods: 1. Single user mode (Using grub menu) 2. Rescue mode (Using linux DVD) # grub-md5-crypt : to create encrypted password
  • 19. TAR (Tap Archiver) It is used for making TAR and compressed file. It is like making zip file and rar files in windows. It also considered as backup and restore method. Commands: # tar -cvf <output.tar> <input folder> To create a tar file # tar -tvf <filename.tar> To check the contents of tar file # tar -xvf <filename.tar> To extract the contents of tar or compressed file # tar -zcvf <output.tar.gz> <input.tar> To create compressed tar file # tar -jcvf <output.tar.bz2> <input.tar> To create compressed .bz2 tar file
  • 20. RPM (Redhat Package Manager) RPM is used to install packages in Redhat Linux OS. The extension of Redhat Linux package is .rpm like .exe in windows. Note: RPM command do not resolve dependency packages automatically. Commands: # rpm -ivh <packagename.rpm> To install package # rpm -e <software name> To uninstall package/software # rpm -qa To get the list of all installed software # rpm -qa grep <keyword> To get the list of installed software using filter # rpm -qi <softwarename> To get info of all installed software
  • 21. RPM (Redhat Package Manager) # rpm -ql <software name> To get the list of file/dir copied to system and its location by package # rpm -qf <file/dir name> To know the responsible package name of file/dir # rpm -ivh --force --nodeps --aid <package name> To install any package forcefully
  • 22. Networking It is assign used to assign IP address in our OS. We can assign IP in two ways 1. Temporary IP setting 2. Permanent IP setting (using manual and DHCP) Commands: # ifconfig To check the IP address and interface # ifup <interface name> To enable LAN interface # ifdown <interface name> To disable LAN interface # hostname To check the hostname of computer
  • 23. Networking # hostname <newhostname> To change the hostname # ifconfig <interface> <ipadress> To assign IP # route add default gw <gateway IP> To assign gateway IP # vim /etc/resolv.conf nameserver <DNS1 IP> nameserver <DNS2 IP> : to assign DNS IP :wq  Temporary IP setting  Permanent IP setting # system-config-network To assign IP, Netmask, Gateway, Hostname, DNS1, DNS2 etc. # service network restart To restart the service of network
  • 24. Networking Important Files:  /etc/sysconfig/network-scripts/ifcfg - <interface> This file contains IP, Netmask, Gateway, MAC etc  /etc/sysconfig/network This file contains hostname  /etc/resolv.conf This file contains DNS IP  /etc/hosts Local DNS entry file
  • 25. Harddisk Management It is used to configure and maintain HDD partitions, volumes and file system in Linux Commands used in HDD management # fdisk -l # fdisk <hdd file name> To enter in HDD management mode Commands used in HDD management mode: : m : for all command and details To check the partition table and HDD details : p : for print current partition table : n : to create new partition or volumes : t : to change file system table : l : to list file system hex code : d : to delete a partition : w : to save and quit : q : to quit without saving # mkfs.ext4 <partition_name> To format Linux partition After any changes done using fdisk command, Restart is compulsary # mkfs.vfat <partition_name> To format windows partition in Linux