SlideShare a Scribd company logo
YCCE, Wanadongari,Nagpur
ITCP PRACTICAL
Prof.Warsha Siraskar
PRACTICAL-1
AIM:
1(A) Introduction to Linux Operating system &
it’s different commands.
1(B) Introduction to Vi editor, Compilation and
Execution of a program in Linux.
1(C) Introduction to Turbo C, Compilation and
Execution of a program on Turbo C.
1(A)
Introduction to Linux Operating system & it’s different
commands.
LINUX
INTRODUCTION
• LINUX is an operating system or a kernel
distributed under an open-source license.
• The kernel is a program at the heart of the
Linux operating system that takes care of
fundamental stuff, like letting hardware
communicate with software.
• Linus devised a Kernel named Linux in 1991.
INTRODUCTION
Top 10 Linux distributions
• Ubuntu
• Fedora
• Linux Mint
• openSUSE
• PCLinuxOS
• Debian
• Mandriva
• Sabayon/Gentoo
• Arch Linux… plus Slackware
• Puppy Linux… plus DSL
Top 10 Linux distributions
Benefits of Linux
Open source
• Linux is an open-source OS that means
anyone can see the source code and
change it according to his needs.
• You can freely install Linux on many
computers without getting paid license.
• If we compare this with windows or mac
then they are paid operating systems.
• You have to get license of windows and
mac to use on your machine.
Benefits of Linux
No anti-virus software needed
• In Linux, you do not need anti-virus software
to be installed on your PC.
• Linux has fewer chances to be affected with
virus.
• The reason for strong virus protection is that
Linux has large number of open source
developers which keeps an eye on virus-
related stuff.
Benefits of Linux
Text editors
• Linux has a vast range of text editors available.
• If you are a programmer then you can pick
any of free software packages like visual
studio code, Vim, Atom etc.
• Most of text editors are freely available and
you can use it without any issue.
Benefits of Linux
Powerful command prompt
• Command prompt in Linux is very advanced
and if you are developer then you can perform
most of your work using the command-line
interface.
• You can install different repositories and
packages through the command-line interface.
Benefits of Linux
No reboot needed
• If you are windows user then you have seen
system reboot while you install/uninstall any
software or rebooting when the system
becomes slow.
• But in case of Linux, you do not need to
reboot your system in such cases.
Benefits of Linux
Low system specifications
• If you have an old computer that has low
specification then you can still run Linux.
• Linux has different distributions that are
available for all types of computers
• e.g. large scale computers, servers, Pc etc.
Benefits of Linux
Good at multitasking
• If you want to do some batch works like
printing a large file or downloading large file
then you can concurrently perform other tasks
like typing or coding any program.
• Linux is good in doing such multitasking and
your system will not slow down.
Benefits of Linux
Less disk space needed
• If you have limited disk space then you can
still run Linux.
• You do not need extra disk space for running
Linux for a longer time.
Benefits of Linux
File formats
• Linux supports a large number of file formats.
So you have to not worry if any file format
does not run on Linux.
• You can install different software packages for
specific file format and it will work fine.
Disadvantages of Linux operating
system
Hardware drivers
• One of the issues that most Linux users face is
that some hardware drivers are not available
for Linux.
• Hardware companies prefer to make drivers
for windows or mac because they have more
users as compared to Linux.
Disadvantages of Linux operating
system
Learning curve
• Getting started with windows is easy for
beginners but learning Linux is difficult.
• You have to learn about the command-line
interface and searching for new software is also
little bit difficult.
• If you face any problem in the operating system
then finding solution is problematic.
• There are fewer experts for Linux as compared to
windows and mac.
Disadvantages of Linux operating
system
Software alternative
• Take an example of Photoshop which is a popular
graphic editing tool.
• Photoshop is available for windows but is not
present in Linux.
• There are other photo editing tools but
Photoshop is a more powerful tool than others.
• MS office is another example which is not
available for Linux users.
Disadvantages of Linux operating
system
Games
• Most of the games are made for windows but
not Linux.
• As windows platform is widely used so game
developers have more interest in windows.
LINUX COMMANDS
pwd command
• Use the pwd command to find out the path of
the current working directory (folder) you’re in.
• The command will return an absolute (full) path,
which is basically a path of all the directories that
starts with a forward slash (/).
• An example of an absolute path is
/home/username.
LINUX COMMANDS
cd command
• To navigate through the Linux files and
directories, use the cd command.
• It requires either the full path or the name of the
directory, depending on the current working
directory that you’re in.
• cd .. (with two dots) to move one directory up
• cd to go straight to the home folder
• cd- (with a hyphen) to move to your previous
directory
LINUX COMMANDS
ls command
• The ls command is used to view the contents of a
directory.
• By default, this command will display the
contents of your current working directory.
• ls -R will list all the files in the sub-directories as
well
• ls -a will show the hidden files
• ls -al will list the files and directories with
detailed information like the permissions, size,
owner, etc.
LINUX COMMANDS
cat command
• cat (short for concatenate) is one of the most
frequently used commands in Linux.
• It is used to list the contents of a file on the standard
output (sdout).
• To run this command, type cat followed by the file’s
name and its extension.
• For instance: cat file.txt.
• cat > filename creates a new file
• cat filename1 filename2>filename3 joins two files (1
and 2) and stores the output of them in a new file (3)
• to convert a file to upper or lower case use, cat
filename | tr a-z A-Z >output.txt
LINUX COMMANDS
cp command
• Use the cp command to copy files from the
current directory to a different directory.
• For instance, the command cp
scenery.jpg /home/username/Pictures would
create a copy of scenery.jpg (from your
current directory) into the Pictures directory
LINUX COMMANDS
mv command
• The primary use of the mv command is to move
files, although it can also be used to rename files.
• The arguments in mv are similar to the cp
command.
• You need to type mv, the file’s name, and the
destination’s directory.
• For example: mv file.txt
/home/username/Documents.
• To rename files, the Linux command is mv
oldname.ext newname.ext
LINUX COMMANDS
mkdir command
• Use mkdir command to make a new directory
— if you type mkdir Music it will create a
directory called Music.
• There are extra mkdir commands as well:
• To generate a new directory inside another
directory, use this Linux basic command mkdir
Music/Newfile
LINUX COMMANDS
rmdir command
• If you need to delete a directory, use
the rmdir command.
• However, rmdir only allows you to delete
empty directories.
LINUX COMMANDS
rm command
• The rm command is used to delete directories
and the contents within them.
• If you only want to delete the directory — as
an alternative to rmdir — use rm -r.
• Note: Be very careful with this command and
double-check which directory you are in.
• This will delete everything and there is no
undo.
LINUX COMMANDS
ping command
• Use the ping command to check your
connectivity status to a server.
• For example, by simply entering ping
google.com, the command will check whether
you’re able to connect to Google and also
measure the response time.
•
LINUX COMMANDS
echo command
• This command is used to move some data into
a file. For example, if you want to add the text,
“Hello, my name is John” into a file called
name.txt, you would type echo Hello, my
name is John >> name.txt
LINUX COMMANDS
clear
• This command is used to clear the terminal
screen.
• Contents will not actually be deleted in this
case, only scrolled down. You can also clear
the screen by pressing Ctrl+L on the keyboard.
1(B)
Introduction to Vi editor, Compilation and Execution of a
programin Linux.
Vi editor
• The VI editor is the most popular and classic
text editor in the Linux family.
• 1) It is available in almost all Linux
Distributions
• 2) It works the same across different platforms
and Distributions
• 3) It is user-friendly. Hence, millions of Linux
users love it and use it for their editing needs
Vi editor
Vi editor
• Nowadays, there are advanced versions of the
vi editor available, and the most popular one
is VIM which is Vi Improved.
Vi editor
vi Command mode
• The vi editor opens in this mode, and it
only understands commands
• In this mode, you can, move the cursor and
cut, copy, paste the text
• This mode also saves the changes you have
made to the file
• Commands are case sensitive. You should use
the right letter case.
vi Command mode
vi Editor Insert mode
• This mode is for inserting text in the file.
• You can switch to the Insert mode from the
command mode by pressing ‘i’ on the keyboard
• Once you are in Insert mode, any key would be
taken as an input for the file on which you are
currently working.
• To return to the command mode and save the
changes you have made you need to press the
Esc key.
vi Editor Insert mode
How to use vi editor
• o launch the VI Editor -Open the Terminal (CLI)
and type
• vi <filename_NEW> or <filename_EXISTING>
• And if you specify an existing file, then the
editor would open it for you to edit.
• Else, you can create a new file.
VI Editing commands
• i – Insert at cursor (goes into insert mode)
• a – Write after cursor (goes into insert mode)
• A – Write at the end of line (goes into insert
mode)
• ESC – Terminate insert mode
• u – Undo last change
• U – Undo all changes to the entire line
• o – Open a new line (goes into insert mode)
• dd – Delete line
• 3dd – Delete 3 lines.
VI Editing commands
• D – Delete contents of line after the cursor
• C – Delete contents of a line after the cursor
and insert new text. Press ESC key to end
insertion.
• dw – Delete word
• 4dw – Delete 4 words
• cw – Change word
• x – Delete character at the cursor
VI Editing commands
• r – Replace character
• R – Overwrite characters from cursor onward
• s – Substitute one character under cursor
continue to insert
• S – Substitute entire line and begin to insert at
the beginning of the line
• ~ – Change case of individual character
Moving within a file
• k – Move cursor up
• j – Move cursor down
• h – Move cursor left
• l – Move cursor right
• You need to be in the command mode to move
within a file.
• The default keys for navigation are mentioned
below else; You can also use the arrow keys on
the keyboard.
Moving within a file
Saving and Closing the file
• Shift+zz – Save the file and quit
• :w – Save the file but keep it open
• :q – Quit without saving
• :wq – Save the file and quit
Program Flow
Open terminal:
– Use the vim editor
– Open file using,
– vim file.c (file name can be anything but it should end with dot c
extension) command.
To Edit the file:
– Press i to go to insert mode.
– Type your program.
To save the file:
– Press Esc button and then type :wq. It will save the file.
To compile the program:
– Type,
– gcc [programName].c -o programName
To Run the program:
– Type,
– ./programName
Simple C program
Then save the file with .c extension.
Compile the C program with gcc
Compiler
• $ gcc [programName].c -o programName
• Example:
• $ gcc sampleProgram.c -o sampleProgram
Run the program
• $ ./programName
• $ ./sampleProgram
1(C)
Introduction to Turbo C, Compilation and Execution of a
program on Turbo C.
Turbo C
• Turbo C was an integrated development
environment (IDE) for programming in the C
language.
• It was developed by Borland and first
introduced in 1987.
• At the time, Turbo C was known for its
compact size, comprehensive manual, fast
compile speed and low price.
Turbo C
Turbo C
Turbo C
Turbo C
Turbo C
Turbo C
Turbo C
Turbo C
CONCLSION
ITCP PRACTICAL-1.pptx

More Related Content

Similar to ITCP PRACTICAL-1.pptx

Linux Day2
Linux Day2Linux Day2
Linux Day2
Bùi Quang Lâm
 
Chapter 1: Introduction to Command Line
Chapter 1: Introduction to  Command LineChapter 1: Introduction to  Command Line
Chapter 1: Introduction to Command Line
azzamhadeel89
 
Linux
LinuxLinux
Chapter 1: Introduction to Command Line
Chapter 1: Introduction  to Command LineChapter 1: Introduction  to Command Line
Chapter 1: Introduction to Command Line
azzamhadeel89
 
Basics of Linux
Basics of LinuxBasics of Linux
Basics of Linux
Nayan Seth
 
Linux week 2
Linux week 2Linux week 2
Linux week 2
Vinoth Sn
 
LinuxCommands (1).pdf
LinuxCommands (1).pdfLinuxCommands (1).pdf
LinuxCommands (1).pdf
AnkitKushwaha792697
 
Linux forensics
Linux forensicsLinux forensics
Linux forensics
Santosh Khadsare
 
Linux Administrator - The Linux Course on Eduonix
Linux Administrator - The Linux Course on EduonixLinux Administrator - The Linux Course on Eduonix
Linux Administrator - The Linux Course on Eduonix
Paddy Lock
 
Linux basics
Linux basicsLinux basics
Linux basics
Santosh Khadsare
 
Operating Systems: Linux in Detail
Operating Systems: Linux in DetailOperating Systems: Linux in Detail
Operating Systems: Linux in Detail
Damian T. Gordon
 
Linux
LinuxLinux
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 - Introductions to Linux Operating System
Linux - Introductions to Linux Operating SystemLinux - Introductions to Linux Operating System
Linux - Introductions to Linux Operating System
Vibrant Technologies & Computers
 
linux operating system.pptx
linux operating system.pptxlinux operating system.pptx
linux operating system.pptx
Kailash510466
 
The Ultimate IBM and Lotus on Linux Workshop for Windows Admins
The Ultimate IBM and Lotus on Linux Workshop for Windows AdminsThe Ultimate IBM and Lotus on Linux Workshop for Windows Admins
The Ultimate IBM and Lotus on Linux Workshop for Windows Admins
Bill Malchisky Jr.
 
Linux Basics.pptx
Linux Basics.pptxLinux Basics.pptx
Linux Basics.pptx
RanjitKumarPanda5
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
Prasanth V
 
Linux a free and open source operating system
Linux a free and open source operating systemLinux a free and open source operating system
Linux a free and open source operating system
banwait
 
Linux a free and open source operating system
Linux a free and open source operating systemLinux a free and open source operating system
Linux a free and open source operating system
banwait
 

Similar to ITCP PRACTICAL-1.pptx (20)

Linux Day2
Linux Day2Linux Day2
Linux Day2
 
Chapter 1: Introduction to Command Line
Chapter 1: Introduction to  Command LineChapter 1: Introduction to  Command Line
Chapter 1: Introduction to Command Line
 
Linux
LinuxLinux
Linux
 
Chapter 1: Introduction to Command Line
Chapter 1: Introduction  to Command LineChapter 1: Introduction  to Command Line
Chapter 1: Introduction to Command Line
 
Basics of Linux
Basics of LinuxBasics of Linux
Basics of Linux
 
Linux week 2
Linux week 2Linux week 2
Linux week 2
 
LinuxCommands (1).pdf
LinuxCommands (1).pdfLinuxCommands (1).pdf
LinuxCommands (1).pdf
 
Linux forensics
Linux forensicsLinux forensics
Linux forensics
 
Linux Administrator - The Linux Course on Eduonix
Linux Administrator - The Linux Course on EduonixLinux Administrator - The Linux Course on Eduonix
Linux Administrator - The Linux Course on Eduonix
 
Linux basics
Linux basicsLinux basics
Linux basics
 
Operating Systems: Linux in Detail
Operating Systems: Linux in DetailOperating Systems: Linux in Detail
Operating Systems: Linux in Detail
 
Linux
LinuxLinux
Linux
 
PowerPoint_merge.ppt on unix programming
PowerPoint_merge.ppt on unix programmingPowerPoint_merge.ppt on unix programming
PowerPoint_merge.ppt on unix programming
 
Linux - Introductions to Linux Operating System
Linux - Introductions to Linux Operating SystemLinux - Introductions to Linux Operating System
Linux - Introductions to Linux Operating System
 
linux operating system.pptx
linux operating system.pptxlinux operating system.pptx
linux operating system.pptx
 
The Ultimate IBM and Lotus on Linux Workshop for Windows Admins
The Ultimate IBM and Lotus on Linux Workshop for Windows AdminsThe Ultimate IBM and Lotus on Linux Workshop for Windows Admins
The Ultimate IBM and Lotus on Linux Workshop for Windows Admins
 
Linux Basics.pptx
Linux Basics.pptxLinux Basics.pptx
Linux Basics.pptx
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
Linux a free and open source operating system
Linux a free and open source operating systemLinux a free and open source operating system
Linux a free and open source operating system
 
Linux a free and open source operating system
Linux a free and open source operating systemLinux a free and open source operating system
Linux a free and open source operating system
 

Recently uploaded

What do the symbols on vehicle dashboard mean?
What do the symbols on vehicle dashboard mean?What do the symbols on vehicle dashboard mean?
What do the symbols on vehicle dashboard mean?
Hyundai Motor Group
 
Here's Why Every Semi-Truck Should Have ELDs
Here's Why Every Semi-Truck Should Have ELDsHere's Why Every Semi-Truck Should Have ELDs
Here's Why Every Semi-Truck Should Have ELDs
jennifermiller8137
 
一比一原版(WashU文凭证书)圣路易斯华盛顿大学毕业证如何办理
一比一原版(WashU文凭证书)圣路易斯华盛顿大学毕业证如何办理一比一原版(WashU文凭证书)圣路易斯华盛顿大学毕业证如何办理
一比一原版(WashU文凭证书)圣路易斯华盛顿大学毕业证如何办理
afkxen
 
53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...
53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...
53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...
MarynaYurchenko2
 
一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理
一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理
一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理
afkxen
 
Kaizen SMT_MI_PCBA for Quality Engineerspptx
Kaizen SMT_MI_PCBA for Quality EngineerspptxKaizen SMT_MI_PCBA for Quality Engineerspptx
Kaizen SMT_MI_PCBA for Quality Engineerspptx
vaibhavsrivastava482521
 
EV Charging at MFH Properties by Whitaker Jamieson
EV Charging at MFH Properties by Whitaker JamiesonEV Charging at MFH Properties by Whitaker Jamieson
EV Charging at MFH Properties by Whitaker Jamieson
Forth
 
Hand Gesture Control Robotic Arm using image processing.pptx
Hand Gesture Control Robotic Arm using image processing.pptxHand Gesture Control Robotic Arm using image processing.pptx
Hand Gesture Control Robotic Arm using image processing.pptx
wstatus456
 
快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样
快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样
快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样
78tq3hi2
 
Catalytic Converter theft prevention - NYC.pptx
Catalytic Converter theft prevention - NYC.pptxCatalytic Converter theft prevention - NYC.pptx
Catalytic Converter theft prevention - NYC.pptx
Blue Star Brothers
 
Globalfleet - global fleet survey 2021 full results
Globalfleet - global fleet survey 2021 full resultsGlobalfleet - global fleet survey 2021 full results
Globalfleet - global fleet survey 2021 full results
vaterland
 
EV Charging at Multifamily Properties by Kevin Donnelly
EV Charging at Multifamily Properties by Kevin DonnellyEV Charging at Multifamily Properties by Kevin Donnelly
EV Charging at Multifamily Properties by Kevin Donnelly
Forth
 
AadiShakti Projects ( Asp Cranes ) Raipur
AadiShakti Projects ( Asp Cranes ) RaipurAadiShakti Projects ( Asp Cranes ) Raipur
AadiShakti Projects ( Asp Cranes ) Raipur
AadiShakti Projects
 
原版制作(Exeter毕业证书)埃克塞特大学毕业证完成信一模一样
原版制作(Exeter毕业证书)埃克塞特大学毕业证完成信一模一样原版制作(Exeter毕业证书)埃克塞特大学毕业证完成信一模一样
原版制作(Exeter毕业证书)埃克塞特大学毕业证完成信一模一样
78tq3hi2
 
Expanding Access to Affordable At-Home EV Charging by Vanessa Warheit
Expanding Access to Affordable At-Home EV Charging by Vanessa WarheitExpanding Access to Affordable At-Home EV Charging by Vanessa Warheit
Expanding Access to Affordable At-Home EV Charging by Vanessa Warheit
Forth
 
What Could Be Behind Your Mercedes Sprinter's Power Loss on Uphill Roads
What Could Be Behind Your Mercedes Sprinter's Power Loss on Uphill RoadsWhat Could Be Behind Your Mercedes Sprinter's Power Loss on Uphill Roads
What Could Be Behind Your Mercedes Sprinter's Power Loss on Uphill Roads
Sprinter Gurus
 
EN Artificial Intelligence by Slidesgo.pptx
EN Artificial Intelligence by Slidesgo.pptxEN Artificial Intelligence by Slidesgo.pptx
EN Artificial Intelligence by Slidesgo.pptx
aichamardi99
 

Recently uploaded (17)

What do the symbols on vehicle dashboard mean?
What do the symbols on vehicle dashboard mean?What do the symbols on vehicle dashboard mean?
What do the symbols on vehicle dashboard mean?
 
Here's Why Every Semi-Truck Should Have ELDs
Here's Why Every Semi-Truck Should Have ELDsHere's Why Every Semi-Truck Should Have ELDs
Here's Why Every Semi-Truck Should Have ELDs
 
一比一原版(WashU文凭证书)圣路易斯华盛顿大学毕业证如何办理
一比一原版(WashU文凭证书)圣路易斯华盛顿大学毕业证如何办理一比一原版(WashU文凭证书)圣路易斯华盛顿大学毕业证如何办理
一比一原版(WashU文凭证书)圣路易斯华盛顿大学毕业证如何办理
 
53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...
53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...
53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...
 
一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理
一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理
一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理
 
Kaizen SMT_MI_PCBA for Quality Engineerspptx
Kaizen SMT_MI_PCBA for Quality EngineerspptxKaizen SMT_MI_PCBA for Quality Engineerspptx
Kaizen SMT_MI_PCBA for Quality Engineerspptx
 
EV Charging at MFH Properties by Whitaker Jamieson
EV Charging at MFH Properties by Whitaker JamiesonEV Charging at MFH Properties by Whitaker Jamieson
EV Charging at MFH Properties by Whitaker Jamieson
 
Hand Gesture Control Robotic Arm using image processing.pptx
Hand Gesture Control Robotic Arm using image processing.pptxHand Gesture Control Robotic Arm using image processing.pptx
Hand Gesture Control Robotic Arm using image processing.pptx
 
快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样
快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样
快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样
 
Catalytic Converter theft prevention - NYC.pptx
Catalytic Converter theft prevention - NYC.pptxCatalytic Converter theft prevention - NYC.pptx
Catalytic Converter theft prevention - NYC.pptx
 
Globalfleet - global fleet survey 2021 full results
Globalfleet - global fleet survey 2021 full resultsGlobalfleet - global fleet survey 2021 full results
Globalfleet - global fleet survey 2021 full results
 
EV Charging at Multifamily Properties by Kevin Donnelly
EV Charging at Multifamily Properties by Kevin DonnellyEV Charging at Multifamily Properties by Kevin Donnelly
EV Charging at Multifamily Properties by Kevin Donnelly
 
AadiShakti Projects ( Asp Cranes ) Raipur
AadiShakti Projects ( Asp Cranes ) RaipurAadiShakti Projects ( Asp Cranes ) Raipur
AadiShakti Projects ( Asp Cranes ) Raipur
 
原版制作(Exeter毕业证书)埃克塞特大学毕业证完成信一模一样
原版制作(Exeter毕业证书)埃克塞特大学毕业证完成信一模一样原版制作(Exeter毕业证书)埃克塞特大学毕业证完成信一模一样
原版制作(Exeter毕业证书)埃克塞特大学毕业证完成信一模一样
 
Expanding Access to Affordable At-Home EV Charging by Vanessa Warheit
Expanding Access to Affordable At-Home EV Charging by Vanessa WarheitExpanding Access to Affordable At-Home EV Charging by Vanessa Warheit
Expanding Access to Affordable At-Home EV Charging by Vanessa Warheit
 
What Could Be Behind Your Mercedes Sprinter's Power Loss on Uphill Roads
What Could Be Behind Your Mercedes Sprinter's Power Loss on Uphill RoadsWhat Could Be Behind Your Mercedes Sprinter's Power Loss on Uphill Roads
What Could Be Behind Your Mercedes Sprinter's Power Loss on Uphill Roads
 
EN Artificial Intelligence by Slidesgo.pptx
EN Artificial Intelligence by Slidesgo.pptxEN Artificial Intelligence by Slidesgo.pptx
EN Artificial Intelligence by Slidesgo.pptx
 

ITCP PRACTICAL-1.pptx

  • 2. PRACTICAL-1 AIM: 1(A) Introduction to Linux Operating system & it’s different commands. 1(B) Introduction to Vi editor, Compilation and Execution of a program in Linux. 1(C) Introduction to Turbo C, Compilation and Execution of a program on Turbo C.
  • 3. 1(A) Introduction to Linux Operating system & it’s different commands.
  • 5. INTRODUCTION • LINUX is an operating system or a kernel distributed under an open-source license. • The kernel is a program at the heart of the Linux operating system that takes care of fundamental stuff, like letting hardware communicate with software. • Linus devised a Kernel named Linux in 1991.
  • 7. Top 10 Linux distributions • Ubuntu • Fedora • Linux Mint • openSUSE • PCLinuxOS • Debian • Mandriva • Sabayon/Gentoo • Arch Linux… plus Slackware • Puppy Linux… plus DSL
  • 8. Top 10 Linux distributions
  • 9. Benefits of Linux Open source • Linux is an open-source OS that means anyone can see the source code and change it according to his needs. • You can freely install Linux on many computers without getting paid license. • If we compare this with windows or mac then they are paid operating systems. • You have to get license of windows and mac to use on your machine.
  • 10. Benefits of Linux No anti-virus software needed • In Linux, you do not need anti-virus software to be installed on your PC. • Linux has fewer chances to be affected with virus. • The reason for strong virus protection is that Linux has large number of open source developers which keeps an eye on virus- related stuff.
  • 11. Benefits of Linux Text editors • Linux has a vast range of text editors available. • If you are a programmer then you can pick any of free software packages like visual studio code, Vim, Atom etc. • Most of text editors are freely available and you can use it without any issue.
  • 12. Benefits of Linux Powerful command prompt • Command prompt in Linux is very advanced and if you are developer then you can perform most of your work using the command-line interface. • You can install different repositories and packages through the command-line interface.
  • 13. Benefits of Linux No reboot needed • If you are windows user then you have seen system reboot while you install/uninstall any software or rebooting when the system becomes slow. • But in case of Linux, you do not need to reboot your system in such cases.
  • 14. Benefits of Linux Low system specifications • If you have an old computer that has low specification then you can still run Linux. • Linux has different distributions that are available for all types of computers • e.g. large scale computers, servers, Pc etc.
  • 15. Benefits of Linux Good at multitasking • If you want to do some batch works like printing a large file or downloading large file then you can concurrently perform other tasks like typing or coding any program. • Linux is good in doing such multitasking and your system will not slow down.
  • 16. Benefits of Linux Less disk space needed • If you have limited disk space then you can still run Linux. • You do not need extra disk space for running Linux for a longer time.
  • 17. Benefits of Linux File formats • Linux supports a large number of file formats. So you have to not worry if any file format does not run on Linux. • You can install different software packages for specific file format and it will work fine.
  • 18. Disadvantages of Linux operating system Hardware drivers • One of the issues that most Linux users face is that some hardware drivers are not available for Linux. • Hardware companies prefer to make drivers for windows or mac because they have more users as compared to Linux.
  • 19. Disadvantages of Linux operating system Learning curve • Getting started with windows is easy for beginners but learning Linux is difficult. • You have to learn about the command-line interface and searching for new software is also little bit difficult. • If you face any problem in the operating system then finding solution is problematic. • There are fewer experts for Linux as compared to windows and mac.
  • 20. Disadvantages of Linux operating system Software alternative • Take an example of Photoshop which is a popular graphic editing tool. • Photoshop is available for windows but is not present in Linux. • There are other photo editing tools but Photoshop is a more powerful tool than others. • MS office is another example which is not available for Linux users.
  • 21. Disadvantages of Linux operating system Games • Most of the games are made for windows but not Linux. • As windows platform is widely used so game developers have more interest in windows.
  • 22. LINUX COMMANDS pwd command • Use the pwd command to find out the path of the current working directory (folder) you’re in. • The command will return an absolute (full) path, which is basically a path of all the directories that starts with a forward slash (/). • An example of an absolute path is /home/username.
  • 23. LINUX COMMANDS cd command • To navigate through the Linux files and directories, use the cd command. • It requires either the full path or the name of the directory, depending on the current working directory that you’re in. • cd .. (with two dots) to move one directory up • cd to go straight to the home folder • cd- (with a hyphen) to move to your previous directory
  • 24. LINUX COMMANDS ls command • The ls command is used to view the contents of a directory. • By default, this command will display the contents of your current working directory. • ls -R will list all the files in the sub-directories as well • ls -a will show the hidden files • ls -al will list the files and directories with detailed information like the permissions, size, owner, etc.
  • 25. LINUX COMMANDS cat command • cat (short for concatenate) is one of the most frequently used commands in Linux. • It is used to list the contents of a file on the standard output (sdout). • To run this command, type cat followed by the file’s name and its extension. • For instance: cat file.txt. • cat > filename creates a new file • cat filename1 filename2>filename3 joins two files (1 and 2) and stores the output of them in a new file (3) • to convert a file to upper or lower case use, cat filename | tr a-z A-Z >output.txt
  • 26. LINUX COMMANDS cp command • Use the cp command to copy files from the current directory to a different directory. • For instance, the command cp scenery.jpg /home/username/Pictures would create a copy of scenery.jpg (from your current directory) into the Pictures directory
  • 27. LINUX COMMANDS mv command • The primary use of the mv command is to move files, although it can also be used to rename files. • The arguments in mv are similar to the cp command. • You need to type mv, the file’s name, and the destination’s directory. • For example: mv file.txt /home/username/Documents. • To rename files, the Linux command is mv oldname.ext newname.ext
  • 28. LINUX COMMANDS mkdir command • Use mkdir command to make a new directory — if you type mkdir Music it will create a directory called Music. • There are extra mkdir commands as well: • To generate a new directory inside another directory, use this Linux basic command mkdir Music/Newfile
  • 29. LINUX COMMANDS rmdir command • If you need to delete a directory, use the rmdir command. • However, rmdir only allows you to delete empty directories.
  • 30. LINUX COMMANDS rm command • The rm command is used to delete directories and the contents within them. • If you only want to delete the directory — as an alternative to rmdir — use rm -r. • Note: Be very careful with this command and double-check which directory you are in. • This will delete everything and there is no undo.
  • 31. LINUX COMMANDS ping command • Use the ping command to check your connectivity status to a server. • For example, by simply entering ping google.com, the command will check whether you’re able to connect to Google and also measure the response time. •
  • 32. LINUX COMMANDS echo command • This command is used to move some data into a file. For example, if you want to add the text, “Hello, my name is John” into a file called name.txt, you would type echo Hello, my name is John >> name.txt
  • 33. LINUX COMMANDS clear • This command is used to clear the terminal screen. • Contents will not actually be deleted in this case, only scrolled down. You can also clear the screen by pressing Ctrl+L on the keyboard.
  • 34. 1(B) Introduction to Vi editor, Compilation and Execution of a programin Linux.
  • 35. Vi editor • The VI editor is the most popular and classic text editor in the Linux family. • 1) It is available in almost all Linux Distributions • 2) It works the same across different platforms and Distributions • 3) It is user-friendly. Hence, millions of Linux users love it and use it for their editing needs
  • 37. Vi editor • Nowadays, there are advanced versions of the vi editor available, and the most popular one is VIM which is Vi Improved.
  • 39. vi Command mode • The vi editor opens in this mode, and it only understands commands • In this mode, you can, move the cursor and cut, copy, paste the text • This mode also saves the changes you have made to the file • Commands are case sensitive. You should use the right letter case.
  • 41. vi Editor Insert mode • This mode is for inserting text in the file. • You can switch to the Insert mode from the command mode by pressing ‘i’ on the keyboard • Once you are in Insert mode, any key would be taken as an input for the file on which you are currently working. • To return to the command mode and save the changes you have made you need to press the Esc key.
  • 43. How to use vi editor • o launch the VI Editor -Open the Terminal (CLI) and type • vi <filename_NEW> or <filename_EXISTING> • And if you specify an existing file, then the editor would open it for you to edit. • Else, you can create a new file.
  • 44. VI Editing commands • i – Insert at cursor (goes into insert mode) • a – Write after cursor (goes into insert mode) • A – Write at the end of line (goes into insert mode) • ESC – Terminate insert mode • u – Undo last change • U – Undo all changes to the entire line • o – Open a new line (goes into insert mode) • dd – Delete line • 3dd – Delete 3 lines.
  • 45. VI Editing commands • D – Delete contents of line after the cursor • C – Delete contents of a line after the cursor and insert new text. Press ESC key to end insertion. • dw – Delete word • 4dw – Delete 4 words • cw – Change word • x – Delete character at the cursor
  • 46. VI Editing commands • r – Replace character • R – Overwrite characters from cursor onward • s – Substitute one character under cursor continue to insert • S – Substitute entire line and begin to insert at the beginning of the line • ~ – Change case of individual character
  • 47. Moving within a file • k – Move cursor up • j – Move cursor down • h – Move cursor left • l – Move cursor right • You need to be in the command mode to move within a file. • The default keys for navigation are mentioned below else; You can also use the arrow keys on the keyboard.
  • 49. Saving and Closing the file • Shift+zz – Save the file and quit • :w – Save the file but keep it open • :q – Quit without saving • :wq – Save the file and quit
  • 50. Program Flow Open terminal: – Use the vim editor – Open file using, – vim file.c (file name can be anything but it should end with dot c extension) command. To Edit the file: – Press i to go to insert mode. – Type your program. To save the file: – Press Esc button and then type :wq. It will save the file. To compile the program: – Type, – gcc [programName].c -o programName To Run the program: – Type, – ./programName
  • 51. Simple C program Then save the file with .c extension.
  • 52. Compile the C program with gcc Compiler • $ gcc [programName].c -o programName • Example: • $ gcc sampleProgram.c -o sampleProgram
  • 53. Run the program • $ ./programName • $ ./sampleProgram
  • 54. 1(C) Introduction to Turbo C, Compilation and Execution of a program on Turbo C.
  • 55. Turbo C • Turbo C was an integrated development environment (IDE) for programming in the C language. • It was developed by Borland and first introduced in 1987. • At the time, Turbo C was known for its compact size, comprehensive manual, fast compile speed and low price.