KEMBAR78
Quick Guide with Linux Command Line | PDF
Quick Guide
 Linux Command Line

  Anuchit Chalothorn
About
â—Ź   Senior Software Engineer @ SIPA
â—Ź   Fedora Ambassador @ Fedora Project
â—Ź   Ubuntu LocoTeam @ Ubuntu Club
Linux?
â—Ź   Operating System
●   “Linux” = Linux kernel
â—Ź   Linus Torvalds develop Linux kernel
â—Ź   More than 10,000 developers around the world
â—Ź   Release under GNU/GPL Version 2.0
Why command line ?




      Hardware




       Kernel


        Shell
Shell
chabu@pirate:~$


root@pirate:~#

       ** file and directory is case sensitive **
Basic Command
$command <option>

Eg: ls -la


       ** use TAB to complete command **
Basic Command
â—Ź   whoami
    show who you are
â—Ź   ls
    list file & directory
â—Ź   cp
    copy file
Basic Command
â—Ź   cd
    change to $HOME directory
â—Ź   cd somedir
    change to somedir
â—Ź   pwd
    show current directory
Basic Command
â—Ź   mv
    move or rename file & directory
â—Ź   touch filename
    create blank file
â—Ź   cat filename
    view content in file
Basic Command
â—Ź   ps
    list the process
â—Ź   pstree
    list the process as tree
â—Ź   cat filename
    view content in file
Basic Command
â—Ź   tar myfile.tar myfile
    create archive file .tar
â—Ź   gzip myfile
    create archive file .gz
â—Ź   tar zxvf myfile.tar.gz myfile
    create archive in tar then gzip
Pipe and Direction
â—Ź   Pipe |
    combined shell command
â—Ź   Direction >,<, >>
    sent out put, sent input
â—Ź   Step Command line ;
    run more command in 1 line
Pipe & Direction
â—Ź   ls -la | more
    list all file in current directory with page break
â—Ź   ls -la > mylistfile.txt
    list all fire in current directory and save the
    result to mylistfile.txt
â—Ź   cat mylistfile.txt > mylistfile2.txt
    list content and sent to mylistfile2.txt
Pipe & Direction
â—Ź   touch mylistfile3.txt
●   echo “Hello World” > mylistfile3.txt
●   echo “My name is Anuchit.ch” >> mylisyfile3.txt
Editor in Command Line
â—Ź   vim or vi
â—Ź   pico
â—Ź   nano
â—Ź   mcedit
Advance Command Line
Combine shell script with basic command or
shell programming...
Q&A
CC-BY-SA

Quick Guide with Linux Command Line

  • 1.
    Quick Guide LinuxCommand Line Anuchit Chalothorn
  • 2.
    About â—Ź Senior Software Engineer @ SIPA â—Ź Fedora Ambassador @ Fedora Project â—Ź Ubuntu LocoTeam @ Ubuntu Club
  • 3.
    Linux? ● Operating System ● “Linux” = Linux kernel ● Linus Torvalds develop Linux kernel ● More than 10,000 developers around the world ● Release under GNU/GPL Version 2.0
  • 4.
    Why command line? Hardware Kernel Shell
  • 5.
    Shell chabu@pirate:~$ root@pirate:~# ** file and directory is case sensitive **
  • 6.
    Basic Command $command <option> Eg:ls -la ** use TAB to complete command **
  • 7.
    Basic Command â—Ź whoami show who you are â—Ź ls list file & directory â—Ź cp copy file
  • 8.
    Basic Command â—Ź cd change to $HOME directory â—Ź cd somedir change to somedir â—Ź pwd show current directory
  • 9.
    Basic Command â—Ź mv move or rename file & directory â—Ź touch filename create blank file â—Ź cat filename view content in file
  • 10.
    Basic Command â—Ź ps list the process â—Ź pstree list the process as tree â—Ź cat filename view content in file
  • 11.
    Basic Command â—Ź tar myfile.tar myfile create archive file .tar â—Ź gzip myfile create archive file .gz â—Ź tar zxvf myfile.tar.gz myfile create archive in tar then gzip
  • 12.
    Pipe and Direction â—Ź Pipe | combined shell command â—Ź Direction >,<, >> sent out put, sent input â—Ź Step Command line ; run more command in 1 line
  • 13.
    Pipe & Direction â—Ź ls -la | more list all file in current directory with page break â—Ź ls -la > mylistfile.txt list all fire in current directory and save the result to mylistfile.txt â—Ź cat mylistfile.txt > mylistfile2.txt list content and sent to mylistfile2.txt
  • 14.
    Pipe & Direction ● touch mylistfile3.txt ● echo “Hello World” > mylistfile3.txt ● echo “My name is Anuchit.ch” >> mylisyfile3.txt
  • 15.
    Editor in CommandLine â—Ź vim or vi â—Ź pico â—Ź nano â—Ź mcedit
  • 16.
    Advance Command Line Combineshell script with basic command or shell programming...
  • 17.
  • 18.