Basics of Linux - PowerPoint PPT Presentation

About This Presentation
Title:

Basics of Linux

Description:

Basics Tutorial of Linux operating system Commands, File Permission, Crontab Syntax – PowerPoint PPT presentation

Number of Views:10306

less

Transcript and Presenter's Notes

Title: Basics of Linux


1
Basics of Linux
  • Gulshan Verma
  • Singsys Pte. Ltd.

2
Tux
  • Tux The Penguin, Mascot of Linux

3
  • It is Unix based Operating System developed by
    community.
  • Originated at 1991.
  • It is free open source software (FOSS)
  • The defining component of Linux is the Linux
    kernel
  • Monolithic
  • Micro
  • The user interface, also known as the shell, is
    either a command-line interface (CLI)
  • Sh simple shell
  • BASH Bourne Again Shell
  • KSH Korne Shell
  • CSH C Shell
  • SSH Secure Shell
  • Text Editor VI, Emacs, gEdit, kWrite, Pico, Nano
    etc.

4
Basics Commands of Linux
5
Basic Commands
  • ls List with filename only
  • ls l List with all details
  • ls a List with hidden files
  • ls -la List with hidden files and details

6
Basic Commands (cont)
  • cd /usr/bin Open folder path
  • pwd returns full path of the current directory
  • which ls
  • whereis ls
  • locate filename
  • find / something.sh
  • echo
  • cat filename
  • cp
  • mv

7
Basic Commands (cont)
  • mkdir
  • rm
  • chgrp
  • chown
  • chmod
  • tar cvfp filename.tar /folder
  • unzip filename
  • tar xvfp filename.tar
  • touch

8
Basic Commands (cont)
  • Linux TAR Command
  • Create linux tar gz (Gzip) archive
  • tar -czvf myarchive.tgz mydirectory/
  • -c, create create a new archive
  • Note that .tgz is the same thing as .tar.gz
  • Create linux simple tar archive (withouth
    compresion)
  • tar -cvf myarchive.tar mydirectory/
  • Extracting linux tar archive
  • Extract linux tar gz (Gzip) archivetar -xzvf
    mystuff.tgz
  • Extract linux simple tar archivetar -xvf
    mystuff.tar
  • We use -x to extract the files form the tar
    archive -x, extract, get extract files from an
    archive
  • Extract linux tar archive to speciefied
    directorytar -xvzf filename.tar.gz -C
    /desired/path
  • And now let us shortly explain this command
  • Usage tar OPTION FILE
  • Let us check the option used in this example
  • -c, create                      create a new
    archive-z, gzip, ungzip        filter the
    archive through gzip-v, verbose                 
      verbosely list files processed-f,
    fileARCHIVE          use archive file or device
    ARCHIVE
  • -C directory file

9
File Permission
10
File Permission (Cont)
  • Octal numbers and permissions
  • You can use octal number to represent
    mode/permission
  • r 4
  • w 2
  • x 1
  • 0rwx 0421 7
  • Only Read and write permission on a file in octal
    is0rwx 0420 6
  • Only read and execute permission on a file in
    octal is0rwx 0401 5
  • User rwx 0421 7
  • Group rwx 0420 6
  • Others rwx 0001 1

11
File Permission (Cont)
12
Creating a crontab file
  • You can create a crontab file by entering the
    following terminal command
  • crontab e
  • To List all the cron job
  • crontab -l

13
Crontab Syntax
14
Crontab examples
  • ltcommandgt Runs every minute 30
  • ltcommandgt Runs at 30 minutes past the
    hour
  • 45 6 ltcommandgt Runs at 645 am every day
  • 45 18 ltcommandgt Runs at 645 pm every day
  • 00 1 0 ltcommandgt Runs at 100 am every
    Sunday
  • 00 1 7 ltcommandgt Runs at 100 am every
    Sunday
  • 00 1 Sun ltcommandgt Runs at 100 am every
    Sunday
  • 30 8 1 ltcommandgt Runs at 830 am on the
    first day of every month
  • 00 0-23/2 02 07 ltcommandgt Runs every other
    hour on the 2nd of July

15
Thank You!
  • info_at_singsys.com
  • Phone-65613900
Write a Comment
User Comments (0)
About PowerShow.com