SlideShare a Scribd company logo
Basic Linux Commands
By- Saini shravan sitaram
GUI vs CLI
Types of Commands
• File Handling commands
• Text Processing Commands
• System Administration Commands
• Process Management Commands
• Network Commands
etc…
File Handling commands
• mkdir - make directories
Syntax: mkdir [OPTION] DIRECTORY...
eg. mkdir Movies
• ls - list directory contents
Syntax: ls
eg. : ls
• cd - changes directories
Syntax: cd Directory1/Directory2
eg. : cd Desktop/presentation
cd .. ,cd /
=>Continued
• pwd - print name of current working directory
Syntax: pwd
eg. : pwd
• cp - copy files and directories
Syntax: cp sourceFile destFile
eg.: cp file1 file2
cp file1 presentation
• mv - move (rename) files
Syntax: mv sourcefile destDirectory
eg. : mv hello presentation
mv hello hi
=>Continued
• rw - remove files or directories
Syntax: rw fileName
eg. : rw hello.txt
rw –rf pictures
• find - search for files in a directory hierarchy
Syntax: find [path] [pattern]
eg.: find file1.txt
• history - prints recently used commands
Syntax: history
eg. : history
More Commands... ??
Learn
By
YourSelf
How to Execute C/C++ programmes in
Linux
1. Install compiler => gcc/g++ compiler
2. Write a programme
3. Give commands to command shell
4. And u did that.
COMPILERS
gcc Compiler
• GCC is installed by
default, in Ubuntu.
Installing g++ Compiler
• Open command shell
• Command:sudo apt-
get install g++
Write a C/C++ programme
• Open text editor
• Write your code
• Save it with .c or .cpp extension
• Create an empty document in the
same directory to store output.
Execute Your Programe
• Open command shell
• Command: compiler fileName –o outputfile
– Ex.
1. gcc cHello.c –o output1
2. g++ cppHello.cpp -o output2
• Command : ./outputFileName =>To see the
content of outputfile
Ad

More Related Content

What's hot (20)

Filepermissions in linux
Filepermissions in linuxFilepermissions in linux
Filepermissions in linux
Subashini Pandiarajan
 
Linux
LinuxLinux
Linux
Gouthaman V
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
Shakeel Shafiq
 
Intro to Linux Shell Scripting
Intro to Linux Shell ScriptingIntro to Linux Shell Scripting
Intro to Linux Shell Scripting
vceder
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
nishantsri
 
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
sbmguys
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
MohanKumar Palanichamy
 
Lesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemLesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File System
Sadia Bashir
 
Linux.ppt
Linux.ppt Linux.ppt
Linux.ppt
onu9
 
Bash shell scripting
Bash shell scriptingBash shell scripting
Bash shell scripting
VIKAS TIWARI
 
Introduction to Shell script
Introduction to Shell scriptIntroduction to Shell script
Introduction to Shell script
Bhavesh Padharia
 
Linux
LinuxLinux
Linux
International Islamic University
 
Linux Basic Commands
Linux Basic CommandsLinux Basic Commands
Linux Basic Commands
Hanan Nmr
 
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 file system
Linux file systemLinux file system
Linux file system
Burhan Abbasi
 
Introduction 2 linux
Introduction 2 linuxIntroduction 2 linux
Introduction 2 linux
Papu Kumar
 
Linux basics
Linux basicsLinux basics
Linux basics
Santosh Khadsare
 
Unix Cheat Sheet
Unix Cheat SheetUnix Cheat Sheet
Unix Cheat Sheet
Loiane Groner
 
Basic Unix
Basic UnixBasic Unix
Basic Unix
Rajesh Kumar
 
Introduction to Linux
Introduction to Linux Introduction to Linux
Introduction to Linux
Harish R
 

Viewers also liked (17)

Basic command ppt
Basic command pptBasic command ppt
Basic command ppt
Rohit Kumar
 
Linux Introduction (Commands)
Linux Introduction (Commands)Linux Introduction (Commands)
Linux Introduction (Commands)
anandvaidya
 
UNIX/Linux training
UNIX/Linux trainingUNIX/Linux training
UNIX/Linux training
Michael Olafusi
 
Basic Linux day 2
Basic Linux day 2Basic Linux day 2
Basic Linux day 2
Saikumar Daram
 
Ip address classes
Ip address classesIp address classes
Ip address classes
urshari
 
Classes of adressing
Classes of adressingClasses of adressing
Classes of adressing
Harish Godiyal
 
Classes of ip addresses
Classes of ip addressesClasses of ip addresses
Classes of ip addresses
NetProtocol Xpert
 
Linuxppt
LinuxpptLinuxppt
Linuxppt
TSUBHASHRI
 
IP Address
IP AddressIP Address
IP Address
Rahul P
 
Linux basics part 1
Linux basics part 1Linux basics part 1
Linux basics part 1
Lilesh Pathe
 
web programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh Malothweb programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh Maloth
Bhavsingh Maloth
 
Linux
Linux Linux
Linux
Hema Prasanth
 
PythonIntro_pycon2010
PythonIntro_pycon2010PythonIntro_pycon2010
PythonIntro_pycon2010
Kannappan Sirchabesan
 
Build and deploy scientific Python Applications
Build and deploy scientific Python Applications  Build and deploy scientific Python Applications
Build and deploy scientific Python Applications
Ramakrishna Reddy
 
Configuration difference between ipv6 and ipv4
Configuration difference between ipv6 and ipv4Configuration difference between ipv6 and ipv4
Configuration difference between ipv6 and ipv4
Huanetwork
 
Tutorial on-python-programming
Tutorial on-python-programmingTutorial on-python-programming
Tutorial on-python-programming
Chetan Giridhar
 
Comparison between ipv4 and ipv6
Comparison between ipv4 and ipv6Comparison between ipv4 and ipv6
Comparison between ipv4 and ipv6
Dharmesh Patel
 
Basic command ppt
Basic command pptBasic command ppt
Basic command ppt
Rohit Kumar
 
Linux Introduction (Commands)
Linux Introduction (Commands)Linux Introduction (Commands)
Linux Introduction (Commands)
anandvaidya
 
Ip address classes
Ip address classesIp address classes
Ip address classes
urshari
 
IP Address
IP AddressIP Address
IP Address
Rahul P
 
Linux basics part 1
Linux basics part 1Linux basics part 1
Linux basics part 1
Lilesh Pathe
 
web programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh Malothweb programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh Maloth
Bhavsingh Maloth
 
Build and deploy scientific Python Applications
Build and deploy scientific Python Applications  Build and deploy scientific Python Applications
Build and deploy scientific Python Applications
Ramakrishna Reddy
 
Configuration difference between ipv6 and ipv4
Configuration difference between ipv6 and ipv4Configuration difference between ipv6 and ipv4
Configuration difference between ipv6 and ipv4
Huanetwork
 
Tutorial on-python-programming
Tutorial on-python-programmingTutorial on-python-programming
Tutorial on-python-programming
Chetan Giridhar
 
Comparison between ipv4 and ipv6
Comparison between ipv4 and ipv6Comparison between ipv4 and ipv6
Comparison between ipv4 and ipv6
Dharmesh Patel
 
Ad

Similar to Basic commands of linux (20)

Linux commands
Linux commands Linux commands
Linux commands
debashis rout
 
Linux commands
Linux commandsLinux commands
Linux commands
Saurabh Gupta
 
Marwan al suwaidi
Marwan al suwaidiMarwan al suwaidi
Marwan al suwaidi
marwanmohammed_
 
Linux basics and commands - from lynxbee.com
Linux basics and commands - from lynxbee.comLinux basics and commands - from lynxbee.com
Linux basics and commands - from lynxbee.com
Green Ecosystem
 
UNIX_Commandspppppppppppppppppppp_Presentation.pptx
UNIX_Commandspppppppppppppppppppp_Presentation.pptxUNIX_Commandspppppppppppppppppppp_Presentation.pptx
UNIX_Commandspppppppppppppppppppp_Presentation.pptx
sufiankedir156
 
davisExam1
davisExam1davisExam1
davisExam1
Ronnell Davis
 
linux commands.pdf
linux commands.pdflinux commands.pdf
linux commands.pdf
amitkamble79
 
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
 
Module 02 Using Linux Command Shell
Module 02 Using Linux Command ShellModule 02 Using Linux Command Shell
Module 02 Using Linux Command Shell
Tushar B Kute
 
workshop_1.ppt
workshop_1.pptworkshop_1.ppt
workshop_1.ppt
hazhamina
 
Linux commands
Linux commandsLinux commands
Linux commands
Radheshyam Kori
 
BASICS OF LINUX OPERATING SYSTEM.pptx
BASICS OF LINUX OPERATING SYSTEM.pptxBASICS OF LINUX OPERATING SYSTEM.pptx
BASICS OF LINUX OPERATING SYSTEM.pptx
AlkaYadav79
 
Linux commands presentation topic discrete structure.ppt
Linux commands presentation topic discrete structure.pptLinux commands presentation topic discrete structure.ppt
Linux commands presentation topic discrete structure.ppt
akshitabansal1815
 
LinuxCommands (1).pdf
LinuxCommands (1).pdfLinuxCommands (1).pdf
LinuxCommands (1).pdf
AnkitKushwaha792697
 
File handling and permisions.pptx
File handling and permisions.pptxFile handling and permisions.pptx
File handling and permisions.pptx
AkampaPhilomena
 
LINUX_admin_commands.pptx
LINUX_admin_commands.pptxLINUX_admin_commands.pptx
LINUX_admin_commands.pptx
GuhanSenthil2
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
Teja Bheemanapally
 
Linux Commands all presentation file .pptx
Linux Commands all  presentation  file .pptxLinux Commands all  presentation  file .pptx
Linux Commands all presentation file .pptx
AshutoshPrajapati30
 
Information about linux operating system
Information about linux operating systemInformation about linux operating system
Information about linux operating system
PriyankaMate4
 
Information about linux operating system
Information about linux operating systemInformation about linux operating system
Information about linux operating system
PriyankaMate4
 
Linux basics and commands - from lynxbee.com
Linux basics and commands - from lynxbee.comLinux basics and commands - from lynxbee.com
Linux basics and commands - from lynxbee.com
Green Ecosystem
 
UNIX_Commandspppppppppppppppppppp_Presentation.pptx
UNIX_Commandspppppppppppppppppppp_Presentation.pptxUNIX_Commandspppppppppppppppppppp_Presentation.pptx
UNIX_Commandspppppppppppppppppppp_Presentation.pptx
sufiankedir156
 
linux commands.pdf
linux commands.pdflinux commands.pdf
linux commands.pdf
amitkamble79
 
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
 
Module 02 Using Linux Command Shell
Module 02 Using Linux Command ShellModule 02 Using Linux Command Shell
Module 02 Using Linux Command Shell
Tushar B Kute
 
workshop_1.ppt
workshop_1.pptworkshop_1.ppt
workshop_1.ppt
hazhamina
 
BASICS OF LINUX OPERATING SYSTEM.pptx
BASICS OF LINUX OPERATING SYSTEM.pptxBASICS OF LINUX OPERATING SYSTEM.pptx
BASICS OF LINUX OPERATING SYSTEM.pptx
AlkaYadav79
 
Linux commands presentation topic discrete structure.ppt
Linux commands presentation topic discrete structure.pptLinux commands presentation topic discrete structure.ppt
Linux commands presentation topic discrete structure.ppt
akshitabansal1815
 
File handling and permisions.pptx
File handling and permisions.pptxFile handling and permisions.pptx
File handling and permisions.pptx
AkampaPhilomena
 
LINUX_admin_commands.pptx
LINUX_admin_commands.pptxLINUX_admin_commands.pptx
LINUX_admin_commands.pptx
GuhanSenthil2
 
Linux Commands all presentation file .pptx
Linux Commands all  presentation  file .pptxLinux Commands all  presentation  file .pptx
Linux Commands all presentation file .pptx
AshutoshPrajapati30
 
Information about linux operating system
Information about linux operating systemInformation about linux operating system
Information about linux operating system
PriyankaMate4
 
Information about linux operating system
Information about linux operating systemInformation about linux operating system
Information about linux operating system
PriyankaMate4
 
Ad

Recently uploaded (20)

Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Wonjun Hwang
 
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and MLGyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
Gyrus AI
 
The Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdfThe Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdf
Precisely
 
Q1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor PresentationQ1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor Presentation
Dropbox
 
AI x Accessibility UXPA by Stew Smith and Olivier Vroom
AI x Accessibility UXPA by Stew Smith and Olivier VroomAI x Accessibility UXPA by Stew Smith and Olivier Vroom
AI x Accessibility UXPA by Stew Smith and Olivier Vroom
UXPA Boston
 
Config 2025 presentation recap covering both days
Config 2025 presentation recap covering both daysConfig 2025 presentation recap covering both days
Config 2025 presentation recap covering both days
TrishAntoni1
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptxSmart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Seasia Infotech
 
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent LasterAI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
All Things Open
 
Cybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and MitigationCybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and Mitigation
VICTOR MAESTRE RAMIREZ
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
Agentic Automation - Delhi UiPath Community Meetup
Agentic Automation - Delhi UiPath Community MeetupAgentic Automation - Delhi UiPath Community Meetup
Agentic Automation - Delhi UiPath Community Meetup
Manoj Batra (1600 + Connections)
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
UiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer OpportunitiesUiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer Opportunities
DianaGray10
 
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
SOFTTECHHUB
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 
Does Pornify Allow NSFW? Everything You Should Know
Does Pornify Allow NSFW? Everything You Should KnowDoes Pornify Allow NSFW? Everything You Should Know
Does Pornify Allow NSFW? Everything You Should Know
Pornify CC
 
Mastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B LandscapeMastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B Landscape
marketing943205
 
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
James Anderson
 
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdfKit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Wonjun Hwang
 
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Wonjun Hwang
 
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and MLGyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
Gyrus AI
 
The Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdfThe Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdf
Precisely
 
Q1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor PresentationQ1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor Presentation
Dropbox
 
AI x Accessibility UXPA by Stew Smith and Olivier Vroom
AI x Accessibility UXPA by Stew Smith and Olivier VroomAI x Accessibility UXPA by Stew Smith and Olivier Vroom
AI x Accessibility UXPA by Stew Smith and Olivier Vroom
UXPA Boston
 
Config 2025 presentation recap covering both days
Config 2025 presentation recap covering both daysConfig 2025 presentation recap covering both days
Config 2025 presentation recap covering both days
TrishAntoni1
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptxSmart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Seasia Infotech
 
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent LasterAI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
All Things Open
 
Cybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and MitigationCybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and Mitigation
VICTOR MAESTRE RAMIREZ
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
UiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer OpportunitiesUiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer Opportunities
DianaGray10
 
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
SOFTTECHHUB
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 
Does Pornify Allow NSFW? Everything You Should Know
Does Pornify Allow NSFW? Everything You Should KnowDoes Pornify Allow NSFW? Everything You Should Know
Does Pornify Allow NSFW? Everything You Should Know
Pornify CC
 
Mastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B LandscapeMastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B Landscape
marketing943205
 
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
James Anderson
 
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdfKit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Wonjun Hwang
 

Basic commands of linux

  • 1. Basic Linux Commands By- Saini shravan sitaram
  • 3. Types of Commands • File Handling commands • Text Processing Commands • System Administration Commands • Process Management Commands • Network Commands etc…
  • 4. File Handling commands • mkdir - make directories Syntax: mkdir [OPTION] DIRECTORY... eg. mkdir Movies • ls - list directory contents Syntax: ls eg. : ls • cd - changes directories Syntax: cd Directory1/Directory2 eg. : cd Desktop/presentation cd .. ,cd /
  • 5. =>Continued • pwd - print name of current working directory Syntax: pwd eg. : pwd • cp - copy files and directories Syntax: cp sourceFile destFile eg.: cp file1 file2 cp file1 presentation • mv - move (rename) files Syntax: mv sourcefile destDirectory eg. : mv hello presentation mv hello hi
  • 6. =>Continued • rw - remove files or directories Syntax: rw fileName eg. : rw hello.txt rw –rf pictures • find - search for files in a directory hierarchy Syntax: find [path] [pattern] eg.: find file1.txt • history - prints recently used commands Syntax: history eg. : history
  • 8. How to Execute C/C++ programmes in Linux 1. Install compiler => gcc/g++ compiler 2. Write a programme 3. Give commands to command shell 4. And u did that.
  • 9. COMPILERS gcc Compiler • GCC is installed by default, in Ubuntu. Installing g++ Compiler • Open command shell • Command:sudo apt- get install g++
  • 10. Write a C/C++ programme • Open text editor • Write your code • Save it with .c or .cpp extension • Create an empty document in the same directory to store output.
  • 11. Execute Your Programe • Open command shell • Command: compiler fileName –o outputfile – Ex. 1. gcc cHello.c –o output1 2. g++ cppHello.cpp -o output2 • Command : ./outputFileName =>To see the content of outputfile
  翻译: