KEMBAR78
Basic commands of linux | PPTX
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

Basic commands of linux

  • 1.
    Basic Linux Commands By-Saini shravan sitaram
  • 2.
  • 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
  • 7.
  • 8.
    How to ExecuteC/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 • GCCis 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