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.