Introduction

to
GNU/Linux

by:
Behnam Ahmad Khan Beigi
Sameer Rahmani

from:




Who we are ?


Karaj LUG



  • What is LUG ?
  • What do you do in LUG ?
  • What did you do in FOSS world ?
  • Karajlug community
  • How can I join karajlug
  • I'm not a linux expert , can I still join Karajlug ?

We . . .

  • have about 12 years experience in GNU/Linux
  • have 8 years experience as senior developer in Yellowen
  • have 3 years experience in Yellowen SRE team
  • have over thousands of contributes to FOSS world
  • are official GNU project developer

Expert in:
PHP, Python, Ruby, Javascript, C/C++,Perl, Lua

Many successful projects

Why we do this?





Free Software culture encourage us to share
our knowledge with others



What we will learn today ?



  • Basic concepts of GNU/Linux
  • Installing a GNU/Linux distribution
  • Feel home in a GNU/Linux box
  • Install a software
  • Use a terminal to navigate linux





    OK Let`s jump in

    Basics



    • What is Linux really ?
    • What is distribution ?
    • What distribution should I choose ?
    • How GNU/Linux differ from Windows ?
    • What is this 'root' thing ?
    • Ok, is there any thing else I should know?

    What is Linux ?


    Linux Is just a Kernel

    Simply it is a layer between applications
     and hardware

    You probably don't need to know about
    Kernel

    So is that enough for an operating system ?

    What is a "Distribution"?


    Distribution is Software collection packaged 
    with an operating system

    What does a distribution contains ?

    Some distributions:
    Debian, Ubuntu, Mint, Fedora and etc

    What distribution should I choose ?





    It`s totally up to you

    The difference

    Think of GNU/Linux as a "Bugatti"
    (Of course open source "Bugatti" :P)


    Think of MS Windows as a 57th "Paykan"


    Now you get it, don't you ?

    The difference



    • You can't learn GNU/Linux by just fooling around
    • Windows is completely closed
    • Windows is commercial
    • Windows report your activities to NSA
    • Windows is a dead end for developers
    • GNU/Linux is the heaven of developers
    • Using GNU/Linux you don't have to worry about viruses

    The difference (technical)


    • GNU/Linux doesn't have "drives"
    • GNU/Linux doesn't have an "Start Menu"
    • GNU/Linux have lots of graphical environments
    • GNU/Linux have strong permissions subsystem
    • GNU/Linux supports wide range of Filesystems
    • GNU/Linux is an Iron Fist
    • You can have an alternative for everything
    • You can have multiple kernels
    • GNU/Linux is lightweight
    • And lots of other differences 

    What is this 'root' thing ?


    • Root is refer to the partition which Linux is installed into
    • Root partition addressed by '/'
    • It`s difference thant `root` user
    • Unix like operating systems have a hierarchy 
      structure (like tree)
    • "Root" is the root of the big tree
    • Other part of system (e.g other partitions) mount
      on branches of tree

    Linux Filesystem schema


    What else ?


    Linux is not Windows

    Don't use it like windows

    Don't learn it like windows

    Always read the ****** manual

    And don't use Window$   :)) 
    (just kidding do what you want)





    Installation

    Important notes


    Make sure WHAT ARE YOU DOING ?

    Free up space before start the installation

    Create a swap partition equal or twice the size
    of your memory

    Backup  your important data






    Let`s do it





    First step in new world

    Graphical Environment

    What you need to know now ?




    • User Permissions
    • `/home` directory
    • Everything is a file
    • Useful commands
    • Manage softwares
    • Resources
    • Where to get help

    User Permissions




    • What is "permission"?
    • How many permissions is there ?
    • How does permissions represent ?
    • What does each permission means ?
    • How to change theme ?

    '/home' directory


    Each user has a directory in '/home' , e.g:
    /home/lxsameer 

    You have full access to your  home directory.
    you can use '~' instead of your home directory path.
    All of your configuration files stored in your home directory

    Everything is a file


    Unix like operating systems model
     everything as files

    Printers, Disks, I/O devices and etc


    for example:
    /dev/sda    # =>  First disk
    /dev/sda1   # First partition in first disk
    /dev/mem   # Physical memory 

     

    Useful Commands


    • man
    • cd
    • ls
    • lsblk
    • cp
    • mv
    • chmod
    • chown
    • cat
    • su
    • sudo

    Useful Commands

    • mount 
    • umount
    • uname
    • history
    • mkdir
    • tar
    • pwd
    • grep 
    • find
    • locate
    • sed
    • sort

    Useful Commands

    • zip & unzip
    • ps
    • top
    • free
    • df
    • du
    • kill
    • killall
    • rm
    • passwd
    • whereis

    Useful Commands



    • which
    • whatis
    • tails
    • less
    • more
    • wget

    Manage Softwares




    • Using package managers:
      apt, yum, pacman and etc
    • language specific package mangers
      pip, gem, npm, maven
    • Manage software manually


    Package Managers (APT)



    • APT is a package manager for Debian based distros.
    • Using APT we can install, remove, update softwares
      easily
    • APT handles dependencies
    • In Debian there are about 50,000 package to use
      by APT

    Package Managers (APT)

    Update package list
    # apt-get update 
    Install a package
    # apt-get install emacs

    Remove a package
    # apt-get purge vim 
    upgrade packages
    # apt-get upgrade
    #apt-get dist-upgrade 

    Manage softwares manually


    There are lots of build toolkits like:
    Make, CMake, Rake, Ant and etc

    Each build toolkit has its own way to build a software


    !!! If you want to build a software from source !!!
    !!! from source read the README file !!!

    Resources to learn GNU/Linux


    • Linux Bible ISBN 111821854X
    • A Practical Guide to Ubuntu Linux ISBN 013254248X
    • FTA academy books (They are free yeaaah :P)
      http://ftacademy.org/
    • And lots of other good books

    If you're not good in English (like me) checkout:

    برپاسازی سرور های لینوکس
    نویسنده: آلن باغومیان انتشارات نص

    Where to get help ?



    • Manuals (The most important one)
    • Search the web
    • Linux forums
    • IRC channels
    • Mailing lists
    • Linux Users Groups (LUGs)

    Do you have any question ?

    Web: 
    IRC :
     irc.freenode.net  #5hit channel
    ML : 
    twitter :
      @yottanami    @lxsameer
    Email:
       yottanami@gnu.org 
    lxsameer@gnu.org





    The End 


    Thanks god it's finished 

    Introduction to Gnu/Linux (Workshop)

    By Sameer Rahmani

    Introduction to Gnu/Linux (Workshop)

    An introduction to Gnu Linux in Kharazmi University

    • 2,223