Announcement

Collapse
No announcement yet.

Linux Survival Guide !!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Linux Survival Guide !!

    In this chapter we'll discuss some of the most common used linux commands that'll help you in your way of hacking. Remeber this is just the beginning so many people may find it boring and impractical .but believe me we'll be going trough more practical stuff in coming lectures (i am not much of a theory guy !!!) all i want to do is make sure all the stuff ahead doesn't seem bizarre to you. So read on....

    In lesson 3 we have seen some hacking and pentesting linux distros that you can use. now we'll learn some relly basic commands used in linux

    Now lets study it comparing it with windows, as most of you must be windows users
    as there is command prompt in windows (cmd) there are shells in linux. a shell is nothing but a place to communicate to the operating system. it is not a part of OS kernel (that why shell)

    there are many shells available in linux bourne shell , csh ,ksh ,bash ,zsh
    bourne shell - traditional unix shell
    csh - its syntaxes are more like c than bourne shell
    ksh - korn shell - written by david korn (faster and superior to bourne shell)
    zsh - very powerfull shell (it is basically ksh+csh+bash)
    bash - bourne again shell is probably the one you'll encounter . you need to learn only this shell
    it was a modification of bourn shell and is also very powerfull

    Now lets have a look at come commands

    We have

    man command --displays help for a specific command (manual page or manpage) (same as command/? in windows)
    eg . man cat

    CD - to change directory
    for eg.
    cd hello ------> changes the directory to hello
    cd .. -----------> moves you one directory up in the filesystem (remember in linux there are all subdirectories with one root directory)

    LS - to list files (as dir in windows)
    for eg.
    ls -l ----------->detailed format files
    ls |more --------> displayes one page at a time - ls output piped (|) in more command
    ls -al --------->shows hidden format -a all files -l detailes format

    cp - to copy files (same as copy in windows)
    for eg.
    cp file1 hello -----------> copies file1 to hello directory
    cp file1 file2 file3... hello ----------------> copies file1 ,file2 ,file3 to directory hello

    mv - renaming or moving command (ren and move commands in windows)
    eg.
    mv hello.txt anuj.txt --------> renames hello.txt to anuj.txt

    rm - deleting files (del command in windows)
    for eg.
    rm -f hello.txt --------> force deletes hello.txt (-f - force remove)
    rm -rf <dir> -----------> deletes files ,subdirectory in a directory

    more filename - types file name
    less filename - types a file name

    cat (reads a file) (type command in windows)
    cat hello.txt --------> reads hello.txt

    shutdown -----------> shutdown the system (same as shutdown in windows)
    eg. shutdown now

    chmod - similar to setting attributes(attrib in windows)
    ps - process status
    pwd (print working directory)

    Text editors:-
    vi ,vim (improved vi) ,pico - text editors (console based)

    these are the console based text editors in linux - really handy to edit a file
    you muxt learn their commands too....

    vi filename -------> opens a file in vi editor
    :# ---------------> go to line #
    / <search> --------> search strings in a document - n key to go to next
    dd ----------------> deletes present line
    x ------------------> Deletes present corrector
    i ------------------>Enters insert mode (before it every character you type is taken as command)
    Esc ---------------->Exits instert mode , return to command mode
    :wq! --------------->save and exits (from cmd mode)
    :q! ---------------->don't save just exit (from cmd mode)
    ZZ -----------------> save and exit (from cmd mode)


    I think you have learnt enough linux commands for now. remeber these are just the basic ones which you must remember . I think thats all for this lesson.

    Bye:-
    Avada Kedavra
    Suggesstions and Feedbacks are appreciated
    Don't Forget To Say Thanks
    Don't Let The Post DIE ... REPLY !!
Working...
X