SlideShare a Scribd company logo
Introduction to
Linux
LINUX
• Linux is an operating system's kernel. It was actually created by Linus
Torvalds from Scratch. Linux is free and open-source, that means that
you can simply change anything in Linux and redistribute it in your
own name! There are several Linux Distributions, commonly called
“distros”.
• Ubuntu Linux
• Red Hat Enterprise Linux
• Linux Mint
• Debian
• Fedora
Linux Shell or “Terminal”
• So, basically, a shell is a program that receives
commands from the user and gives it to the OS to
process, and it shows the output. Linux's shell is
its main part. Its distros come in GUI (graphical
user interface), but basically, Linux has a CLI
(command line interface).
• To open the terminal, press Ctrl+Alt+T in Ubuntu
Installation
• Virtual box is free and open-source virtualization software from Oracle. It
enables us to install other operating systems in virtual machines. It is
recommended that our system should have at least 4GB of RAM to get decent
performance from the virtual operating system.​
• Then we need to go to the website of Oracle VirtualBox and get the latest
stable version from there.​Next, download Ubuntu. We can get this from the
official website of Ubuntu . Now we have installed VirtualBox, and we have
downloaded Ubuntu. We are now set to install Linux in VirtualBox.​
Shortcut keys to Open
and Close Ubuntu
Terminal
• In Ubuntu the terminal shortcut key is mapped to
ctrl+Alt+T to open the terminal and for closing ctrl+d.
Some Basic
Commands
• Echo : echo command in Linux is used to display line of
text/string that are passed as an argument. EX : echo
hello(it will return hello).
• ​Cal : To display current month's calendar. For all months we
must write cal 2021 then it will show all months of that
year.​
• Date : This command will show gives the present date ,
time and year. ​
• Clear : This command will clear your terminal.​Shortcut key
is ctrl+L
• History: To get history of the commands.
• Exit: Exit from terminal
• history –c; history –w : will clear the history of commands.
• Ls:- list the contents of the folder
• Cat:- It is used to create a file with content. It can concatenate two or more file contents.
• Touch:- it is used to create a file without content.
• Cp:- copies file from one location to another.
• Cd:- It is used for changing the directory.
• Mv:-It is used to move files from one location to another.
• Pwd:-It prints the current working directory with full path name from terminal
• mkdir:- It is used to create new directory.
• Whereis: It is used to locate the source and manual pages
of the command.
• Man:- It provides online documentation for all possible
commands and its options.
• WHOAMI:-It is used to find out the current user of the
terminal.
• Info:- It provides online documentation for all the
commands but in a better structured way.
• Bc :-It means the basic calculator, used for the basic calculations.
• Grep :- It searches the given file for lines containing a match to the given strings or
words.
• Head:- It prints the first 10 lines of the given file.
• Tail :-It prints the last 10 lines of the given file.
• Tac :-It prints content of the given file in reverse order.
• Df :- Report disk usages of file system. It is useful for user as well as System
Administrator to keep track of their disk usages.
• DU -Estimate files space usage. df only reports usage statistics on file systems,
while ‘du‘, on the other hand, measures directory contents.
• PS - ps (Process) gives the status of running processes with a unique Id called
PID.
• SUDO -It allows a permitted user to execute a command as the super user or
another user.
• SU -It is used to run shell with substitute user and group IDs.It helps to change
login session’s owner without the owner having to first logout of that session.
• PASSWD-It is used for changing the passwd.It is mandatory to know the current
passwd for the security reason.
Deleting Files
and
Directories
• rm <file> : Remove a file .e.g., rm ~/Desktop/file1.txt
• rm -r <directory> : Removes a directory. e.g., rm -r
~/newdir
• rm –i : Removes in an interactive manner. This is a good
safety measure.
• rmdir <empty directory> : Only remove empty directories
.e.g., rmdir ~/emptydir
Shell
• A shell is a user interface for access to an operating
system's services. Most often the user interacts with
the shell using a command-line interface (CLI).
The terminal is a program that opens a graphical
window and lets you interact with the shell.
• Shell is a program which processes commands and
returns output , like bash in Linux .
• Commands are case sensitive.
• We can use this technique to write commands in shell:-
CommandName -options input.
• commandName must be a valid program on the Shell’s Path. To check this, use the which command
like :
which commandName
• If a path is returned, then the commandName is valid and vice versa.
Example:-
• echo $Path: Path of the command Path.
• which cal: cal command was in which folder.
• Date –u/date --universal: gives universal standard time.
Short Form:-
• We can specify options for each command to customise the commands behaviour. These can be
either “short-form” options or “long-form” options.
• Each command behaves differently so check the command’s manual (man) page for the specifics of
each command’s behaviour.
• Short-form options are where a letter defines an option. Each option is prepended by a dash “-“
like:
commandName –a –b –c args
• To save typing, you could join together the options: commandName –abc args.
• Both of these formats are equivalent.
Long Form:-
• There are long-form options defined to make options easier to identify.
• Longform options are usually prepended by a double dash “--“.
• Long-form options cannot be joined together like short-form options can.
• If long form options are defined for options “a”, “b” and “c”, then: commandName –a –b -c
arguments is equivalent to commandName --alpha --beta --charlie arguments
Bash
Scripting
• Bash is a type of interpreter that processes shell commands. A
command is given in the form of plain text that calls operating
system services to perform a task.
• Commands like ls and cd are frequently used by programmers;
these commands are written in the terminal. The terminal acts as
an interface for the shell interpreter.
• A Bash script is a text file containing a series of commands.
• Bash scripts are given an extension of .sh
Piping
• Standard Data Streams can be redirected and are identified using their stream number. Redirection of the
standard output of one command to the standard input of another command is known as piping.
• Redirecting Standard Output: Standard output is stream number 1. There are 2 methods to redirect
standard output. The long form, using the stream number: commandName –options arguments 1>
destination Or the short form, with no stream number: commandName –options arguments >
destination
• Redirecting Standard Error: Standard error is stream number 2. Here is how to redirect standard error
commandName –options arguments 2> destination Standard error can be redirected at the same time as
standard output: commandName –options arguments 1> output_destination 2> error_destination
• Redirecting Standard Input: Standard Input is stream number 0. There are 2 methods to redirect
standard Input. The long form, using the stream number: commandName –options arguments 0<
input_source Or the short form, with no stream number: commandName –options arguments <
input_source
Aliases
• It is the nickname for a command/pipeline.
• It is a build in shell command that lets us assign name for a long command or frequently
used command.
• Aliases go in a .bash_aliases file in your home directory. If it does not exist, you need to
create it ,spelled exactly
• Example: alias aliasName=”ABCD”
Piping to an
Alias
• If the first command in an alias accepts standard input,
then the alias can be piped to; even if it is an entire
pipeline!
• Our alias is currently: alias calmagic=”cal –A 1 –B 1 12
2017”
• cal is the first command in this alias, but cal doesn’t
accept standard input.Therefore, this would not work:
commandOne –options arguments | calmagic
• However, if we adjust our alias so that it can accept
standard input:
alias calmagic=”xargs cal –A 1 –B 1 12 2017”
• This will now work: commandOne –options arguments |
calmagic
File Achieving
and
Compressing
• Archiving and compressing files in Linux is a two-step process.
• 1) Create a Tarball First, you will create what is known as a tar
file or “tarball”. A tarball is a way of bundling together the files
that you want to archive.
• 2) Compress the tarball with a compression
algorithm.Secondly, you will then compress that tarball with
one of a variety of compression algorithms.
• Creating a tarball
• tar –cvf <name of tarball> <file>…
• Checking a Tarball’s Contents
• tar –tf <name of tarball>
• Extracting a Tar ball’s Contents
• tar –xv <name of tarball>
• Compressing Tarballs
Tarballs are just containers for files. They don’t by themselves
do any compression, but they can be compressed using a
variety of compression algorithms.The main types of
compression algorithms are gzip and bzip2.
Compressing and Decompressing with gzip
Compressing with gzip:- gzip <name of tarball>
Decompressing with gzip:- gunzip <name of tarball>
• Compressing and Decompressing with bzip2
Compressing with bzip2: bzip2 <name of tarball>
Decompressing with bzip2 : bunzip2 <name of tarball>
Doing it all in one step
Creating a tarball and compressing via gzip: tar –cvzf <name of tarball> <file>
Decompressing a tarball and extracting via xzip: tar –xvzf <name of tarball>
Creating a tarball and compressing via bzip2: tar –cvjf <name of tarball> <file>
Decompressing a tarball and extracting via bzip2: tar –xvjf <name of tarball>
Creating a tarball and compressing via xzip : tar –cvJf<name of tarball> <file>
Decompressing a tarball and extracting via xzip : tar –xvJf<name of tarball>

More Related Content

What's hot

Linux seminar
Linux seminarLinux seminar
Linux seminar
Buntha Chhay
 
Linux
LinuxLinux
Linux Commands
Linux CommandsLinux Commands
Linux Commands
Ramasubbu .P
 
Linux basics
Linux basicsLinux basics
Linux basics
Santosh Khadsare
 
Linux introduction
Linux introductionLinux introduction
Linux introduction
Md. Zahid Hossain Shoeb
 
Introduction to linux ppt
Introduction to linux pptIntroduction to linux ppt
Introduction to linux ppt
Omi Vichare
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
Sagar Kumar
 
Linux basics
Linux basicsLinux basics
Linux basics
Shagun Rathore
 
Introduction 2 linux
Introduction 2 linuxIntroduction 2 linux
Introduction 2 linux
Papu Kumar
 
Linux
Linux Linux
Linux
Kevin James
 
Linux file system
Linux file systemLinux file system
Linux file system
Md. Tanvir Hossain
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structure
Sreenatha Reddy K R
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
Stephen Ahiante
 
Basic 50 linus command
Basic 50 linus commandBasic 50 linus command
Basic 50 linus command
MAGNA COLLEGE OF ENGINEERING
 
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
Emertxe Information Technologies Pvt Ltd
 
Linux commands
Linux commandsLinux commands
Linux commands
Mannu Khani
 
Introduction to Shell script
Introduction to Shell scriptIntroduction to Shell script
Introduction to Shell script
Bhavesh Padharia
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
Shakeel Shafiq
 
Linux operating system ppt
Linux operating system pptLinux operating system ppt
Linux operating system ppt
Achyut Sinha
 
Presentation on linux
Presentation on linuxPresentation on linux
Presentation on linux
Veeral Bhateja
 

What's hot (20)

Linux seminar
Linux seminarLinux seminar
Linux seminar
 
Linux
LinuxLinux
Linux
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
 
Linux basics
Linux basicsLinux basics
Linux basics
 
Linux introduction
Linux introductionLinux introduction
Linux introduction
 
Introduction to linux ppt
Introduction to linux pptIntroduction to linux ppt
Introduction to linux ppt
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
 
Linux basics
Linux basicsLinux basics
Linux basics
 
Introduction 2 linux
Introduction 2 linuxIntroduction 2 linux
Introduction 2 linux
 
Linux
Linux Linux
Linux
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structure
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
Basic 50 linus command
Basic 50 linus commandBasic 50 linus command
Basic 50 linus command
 
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
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Introduction to Shell script
Introduction to Shell scriptIntroduction to Shell script
Introduction to Shell script
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
 
Linux operating system ppt
Linux operating system pptLinux operating system ppt
Linux operating system ppt
 
Presentation on linux
Presentation on linuxPresentation on linux
Presentation on linux
 

Similar to Linux

LinuxCommands (1).pdf
LinuxCommands (1).pdfLinuxCommands (1).pdf
LinuxCommands (1).pdf
AnkitKushwaha792697
 
Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01
Chander Pandey
 
Group13
Group13Group13
redhat_by_Cbitss.ppt
redhat_by_Cbitss.pptredhat_by_Cbitss.ppt
redhat_by_Cbitss.ppt
VikrantSChohaan
 
Linux week 2
Linux week 2Linux week 2
Linux week 2
Vinoth Sn
 
Unix cmc
Unix cmcUnix cmc
Unix cmc
Oussama BENNANI
 
LINUX_admin_commands.pptx
LINUX_admin_commands.pptxLINUX_admin_commands.pptx
LINUX_admin_commands.pptx
GuhanSenthil2
 
Linux Basics.pptx
Linux Basics.pptxLinux Basics.pptx
Linux Basics.pptx
RanjitKumarPanda5
 
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
Rajesh Kumar
 
UNIX/Linux training
UNIX/Linux trainingUNIX/Linux training
UNIX/Linux training
Michael Olafusi
 
2. UNIX OS System Architecture easy.pptx
2. UNIX OS System Architecture easy.pptx2. UNIX OS System Architecture easy.pptx
2. UNIX OS System Architecture easy.pptx
Priyadarshini648418
 
linux commands that might be helpful.pptx
linux commands that might be helpful.pptxlinux commands that might be helpful.pptx
linux commands that might be helpful.pptx
MeghrajPatil11
 
Ericas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-GuideEricas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-Guide
Erica StJohn
 
Linux operating system by Quontra Solutions
Linux operating system by Quontra SolutionsLinux operating system by Quontra Solutions
Linux operating system by Quontra Solutions
QUONTRASOLUTIONS
 
Unix _linux_fundamentals_for_hpc-_b
Unix  _linux_fundamentals_for_hpc-_bUnix  _linux_fundamentals_for_hpc-_b
Unix _linux_fundamentals_for_hpc-_b
Mohammad Reza Beygi
 
Lpt lopsa
Lpt lopsaLpt lopsa
Lpt lopsa
ketancmaheshwari
 
PowerPoint_merge.ppt on unix programming
PowerPoint_merge.ppt on unix programmingPowerPoint_merge.ppt on unix programming
PowerPoint_merge.ppt on unix programming
Priyadarshini648418
 
Linux
LinuxLinux
Linux commands
Linux commandsLinux commands
Linux commands
penetration Tester
 
CSA-lecture 6.pptx
CSA-lecture 6.pptxCSA-lecture 6.pptx
CSA-lecture 6.pptx
UsmanAshraf656960
 

Similar to Linux (20)

LinuxCommands (1).pdf
LinuxCommands (1).pdfLinuxCommands (1).pdf
LinuxCommands (1).pdf
 
Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01
 
Group13
Group13Group13
Group13
 
redhat_by_Cbitss.ppt
redhat_by_Cbitss.pptredhat_by_Cbitss.ppt
redhat_by_Cbitss.ppt
 
Linux week 2
Linux week 2Linux week 2
Linux week 2
 
Unix cmc
Unix cmcUnix cmc
Unix cmc
 
LINUX_admin_commands.pptx
LINUX_admin_commands.pptxLINUX_admin_commands.pptx
LINUX_admin_commands.pptx
 
Linux Basics.pptx
Linux Basics.pptxLinux Basics.pptx
Linux Basics.pptx
 
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
 
UNIX/Linux training
UNIX/Linux trainingUNIX/Linux training
UNIX/Linux training
 
2. UNIX OS System Architecture easy.pptx
2. UNIX OS System Architecture easy.pptx2. UNIX OS System Architecture easy.pptx
2. UNIX OS System Architecture easy.pptx
 
linux commands that might be helpful.pptx
linux commands that might be helpful.pptxlinux commands that might be helpful.pptx
linux commands that might be helpful.pptx
 
Ericas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-GuideEricas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-Guide
 
Linux operating system by Quontra Solutions
Linux operating system by Quontra SolutionsLinux operating system by Quontra Solutions
Linux operating system by Quontra Solutions
 
Unix _linux_fundamentals_for_hpc-_b
Unix  _linux_fundamentals_for_hpc-_bUnix  _linux_fundamentals_for_hpc-_b
Unix _linux_fundamentals_for_hpc-_b
 
Lpt lopsa
Lpt lopsaLpt lopsa
Lpt lopsa
 
PowerPoint_merge.ppt on unix programming
PowerPoint_merge.ppt on unix programmingPowerPoint_merge.ppt on unix programming
PowerPoint_merge.ppt on unix programming
 
Linux
LinuxLinux
Linux
 
Linux commands
Linux commandsLinux commands
Linux commands
 
CSA-lecture 6.pptx
CSA-lecture 6.pptxCSA-lecture 6.pptx
CSA-lecture 6.pptx
 

Recently uploaded

CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
sachin chaurasia
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
mamunhossenbd75
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
University of Maribor
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
IJNSA Journal
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
171ticu
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
Aditya Rajan Patra
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
wisnuprabawa3
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
171ticu
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
IJECEIAES
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
mamamaam477
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
KrishnaveniKrishnara1
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 

Recently uploaded (20)

CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 

Linux

  • 2. LINUX • Linux is an operating system's kernel. It was actually created by Linus Torvalds from Scratch. Linux is free and open-source, that means that you can simply change anything in Linux and redistribute it in your own name! There are several Linux Distributions, commonly called “distros”. • Ubuntu Linux • Red Hat Enterprise Linux • Linux Mint • Debian • Fedora
  • 3. Linux Shell or “Terminal” • So, basically, a shell is a program that receives commands from the user and gives it to the OS to process, and it shows the output. Linux's shell is its main part. Its distros come in GUI (graphical user interface), but basically, Linux has a CLI (command line interface). • To open the terminal, press Ctrl+Alt+T in Ubuntu
  • 4. Installation • Virtual box is free and open-source virtualization software from Oracle. It enables us to install other operating systems in virtual machines. It is recommended that our system should have at least 4GB of RAM to get decent performance from the virtual operating system.​ • Then we need to go to the website of Oracle VirtualBox and get the latest stable version from there.​Next, download Ubuntu. We can get this from the official website of Ubuntu . Now we have installed VirtualBox, and we have downloaded Ubuntu. We are now set to install Linux in VirtualBox.​
  • 5. Shortcut keys to Open and Close Ubuntu Terminal • In Ubuntu the terminal shortcut key is mapped to ctrl+Alt+T to open the terminal and for closing ctrl+d.
  • 6. Some Basic Commands • Echo : echo command in Linux is used to display line of text/string that are passed as an argument. EX : echo hello(it will return hello). • ​Cal : To display current month's calendar. For all months we must write cal 2021 then it will show all months of that year.​ • Date : This command will show gives the present date , time and year. ​ • Clear : This command will clear your terminal.​Shortcut key is ctrl+L • History: To get history of the commands. • Exit: Exit from terminal • history –c; history –w : will clear the history of commands.
  • 7. • Ls:- list the contents of the folder • Cat:- It is used to create a file with content. It can concatenate two or more file contents. • Touch:- it is used to create a file without content. • Cp:- copies file from one location to another. • Cd:- It is used for changing the directory. • Mv:-It is used to move files from one location to another. • Pwd:-It prints the current working directory with full path name from terminal
  • 8. • mkdir:- It is used to create new directory. • Whereis: It is used to locate the source and manual pages of the command. • Man:- It provides online documentation for all possible commands and its options. • WHOAMI:-It is used to find out the current user of the terminal. • Info:- It provides online documentation for all the commands but in a better structured way.
  • 9. • Bc :-It means the basic calculator, used for the basic calculations. • Grep :- It searches the given file for lines containing a match to the given strings or words. • Head:- It prints the first 10 lines of the given file. • Tail :-It prints the last 10 lines of the given file. • Tac :-It prints content of the given file in reverse order. • Df :- Report disk usages of file system. It is useful for user as well as System Administrator to keep track of their disk usages.
  • 10. • DU -Estimate files space usage. df only reports usage statistics on file systems, while ‘du‘, on the other hand, measures directory contents. • PS - ps (Process) gives the status of running processes with a unique Id called PID. • SUDO -It allows a permitted user to execute a command as the super user or another user. • SU -It is used to run shell with substitute user and group IDs.It helps to change login session’s owner without the owner having to first logout of that session. • PASSWD-It is used for changing the passwd.It is mandatory to know the current passwd for the security reason.
  • 11. Deleting Files and Directories • rm <file> : Remove a file .e.g., rm ~/Desktop/file1.txt • rm -r <directory> : Removes a directory. e.g., rm -r ~/newdir • rm –i : Removes in an interactive manner. This is a good safety measure. • rmdir <empty directory> : Only remove empty directories .e.g., rmdir ~/emptydir
  • 12. Shell • A shell is a user interface for access to an operating system's services. Most often the user interacts with the shell using a command-line interface (CLI). The terminal is a program that opens a graphical window and lets you interact with the shell. • Shell is a program which processes commands and returns output , like bash in Linux . • Commands are case sensitive.
  • 13. • We can use this technique to write commands in shell:- CommandName -options input. • commandName must be a valid program on the Shell’s Path. To check this, use the which command like : which commandName • If a path is returned, then the commandName is valid and vice versa. Example:- • echo $Path: Path of the command Path. • which cal: cal command was in which folder. • Date –u/date --universal: gives universal standard time.
  • 14. Short Form:- • We can specify options for each command to customise the commands behaviour. These can be either “short-form” options or “long-form” options. • Each command behaves differently so check the command’s manual (man) page for the specifics of each command’s behaviour. • Short-form options are where a letter defines an option. Each option is prepended by a dash “-“ like: commandName –a –b –c args • To save typing, you could join together the options: commandName –abc args. • Both of these formats are equivalent. Long Form:- • There are long-form options defined to make options easier to identify. • Longform options are usually prepended by a double dash “--“. • Long-form options cannot be joined together like short-form options can. • If long form options are defined for options “a”, “b” and “c”, then: commandName –a –b -c arguments is equivalent to commandName --alpha --beta --charlie arguments
  • 15. Bash Scripting • Bash is a type of interpreter that processes shell commands. A command is given in the form of plain text that calls operating system services to perform a task. • Commands like ls and cd are frequently used by programmers; these commands are written in the terminal. The terminal acts as an interface for the shell interpreter. • A Bash script is a text file containing a series of commands. • Bash scripts are given an extension of .sh
  • 16. Piping • Standard Data Streams can be redirected and are identified using their stream number. Redirection of the standard output of one command to the standard input of another command is known as piping. • Redirecting Standard Output: Standard output is stream number 1. There are 2 methods to redirect standard output. The long form, using the stream number: commandName –options arguments 1> destination Or the short form, with no stream number: commandName –options arguments > destination • Redirecting Standard Error: Standard error is stream number 2. Here is how to redirect standard error commandName –options arguments 2> destination Standard error can be redirected at the same time as standard output: commandName –options arguments 1> output_destination 2> error_destination • Redirecting Standard Input: Standard Input is stream number 0. There are 2 methods to redirect standard Input. The long form, using the stream number: commandName –options arguments 0< input_source Or the short form, with no stream number: commandName –options arguments < input_source
  • 17. Aliases • It is the nickname for a command/pipeline. • It is a build in shell command that lets us assign name for a long command or frequently used command. • Aliases go in a .bash_aliases file in your home directory. If it does not exist, you need to create it ,spelled exactly • Example: alias aliasName=”ABCD”
  • 18. Piping to an Alias • If the first command in an alias accepts standard input, then the alias can be piped to; even if it is an entire pipeline! • Our alias is currently: alias calmagic=”cal –A 1 –B 1 12 2017” • cal is the first command in this alias, but cal doesn’t accept standard input.Therefore, this would not work: commandOne –options arguments | calmagic • However, if we adjust our alias so that it can accept standard input: alias calmagic=”xargs cal –A 1 –B 1 12 2017” • This will now work: commandOne –options arguments | calmagic
  • 19. File Achieving and Compressing • Archiving and compressing files in Linux is a two-step process. • 1) Create a Tarball First, you will create what is known as a tar file or “tarball”. A tarball is a way of bundling together the files that you want to archive. • 2) Compress the tarball with a compression algorithm.Secondly, you will then compress that tarball with one of a variety of compression algorithms. • Creating a tarball • tar –cvf <name of tarball> <file>…
  • 20. • Checking a Tarball’s Contents • tar –tf <name of tarball> • Extracting a Tar ball’s Contents • tar –xv <name of tarball> • Compressing Tarballs Tarballs are just containers for files. They don’t by themselves do any compression, but they can be compressed using a variety of compression algorithms.The main types of compression algorithms are gzip and bzip2. Compressing and Decompressing with gzip Compressing with gzip:- gzip <name of tarball> Decompressing with gzip:- gunzip <name of tarball>
  • 21. • Compressing and Decompressing with bzip2 Compressing with bzip2: bzip2 <name of tarball> Decompressing with bzip2 : bunzip2 <name of tarball> Doing it all in one step Creating a tarball and compressing via gzip: tar –cvzf <name of tarball> <file> Decompressing a tarball and extracting via xzip: tar –xvzf <name of tarball> Creating a tarball and compressing via bzip2: tar –cvjf <name of tarball> <file> Decompressing a tarball and extracting via bzip2: tar –xvjf <name of tarball> Creating a tarball and compressing via xzip : tar –cvJf<name of tarball> <file> Decompressing a tarball and extracting via xzip : tar –xvJf<name of tarball>