Tuesday, 21 June 2016

most important linux commands

Here is the list of most important linux commands and easy description of the linux commands.It will provide you the great capability to access the linux operating system by by using applications on terminal using commands.





  1. alias

    It provides an alias name to a command using a variable
    eg:
    • root@kali:~# alias shift=cd  /Desktop

    • shift

    • root@kali:~/Desktop#
  2. most important linux commands

  3. apropos

    It provides proper description of manual pages.
    It is provided a keyword and it describes that keyword completely
    eg:
    • root@kali:~# apropos mkdir

    in the terminal it'll describe mkdir completely

  4. apt-get

    It is the command line tool which first searches
    package and then installs it
    eg:
    • root@kali:~# apt-get install python

    • It will install python in linux

  5. aptitude

    It is the command line tool which also first searches
    package and then installs it
    eg:
    • root@kali:~# aptitude install python

    • It will install python in linux

  6. aspell

    It is an interactive tool which also first scans the files
    and if any spelling mistakes found,it helps to correct the spelling
    Syntax: aspell [options] command
    eg:
    • root@kali:~# aspell check --sug-mode=fast -d en_US imtheking.txt

    • It will check the file imtheking.txt by using fast suggestion mode and the American English dictionary

  7. awk

    It is used to parse and manipulate tabular data. It operates on a line-by-line basis and iterates through the entire file.
    • The basic format of an awk command is:
      awk  '/search_pattern/  { action_to_take_on_matches}'   file_to_parse

  8. bzip2

    It is used to both compress or decompress the specified file name
    • To compress any file say iamtheking.txt the command is
    • root@kali:~/Desktop#  bzip2 iamtheking.txt
    • the file will be converted to iamtheking.txt.bz2
    • To decompress the same file the command is
    • root@kali:~/Desktop#  bzip2 -d iamtheking.txt.bz2
    • the file will be converted to iamtheking.txt again

  9. bg

    It is the command to control the jobs.
    It is used to again resume suspended jobs by sending them to run in background
    • Syntax: bg [job]
      Example: bg %6
    • It will send the process with PID 6 to the background

  10. break

    It is the shell function which is use to escape from the loops
    like for,foreach,while or until loop
    • example  for sandy in 1 2 3 4 5 6 8 9
      do
      echo -n "$sandy"
      if [ "$sandy" -eq 5 ]
      then
      break #This line will break us out of the for loop

  11. basename

    It is use to disammble directory names and suffix from file names
    • for a file named magic in directory apache2, the command is:
    • root@kali:~# basename  /etc/apache2/magic
    • magic

  12. cat

      It does two things:
    • copies standard input to standard output
    • concatenates files into bigger ones
      Examples:
    • root@kali:~/Desktop# cat iamtheking.txt
    • It will display the contents of file iamtheking.txt on the terminal screen
    • root@kali:~/Desktop# cat iamtheking.txt iaminfinity.txt
    • It will copy all contents of file iamtheking.txt to iaminfinity.txt

  13. cd

    It is the linux command mainly used to change directories
    Example
    • root@kali:~# cd /Desktop
    • root@kali:~/Desktop#  
    • to go to home directory
    • root@kali:~# cd ~
    • to go to parent directory
    • root@kali:~# cd ..
    • to go to previous directory
    • root@kali:~# cd -

  14. cp

    It is use to copy file(s) or directory to another file or directory
    example
    • root@kali:~# cp iamtheking.txt iaminfinity.txt
    • contents of iamtheking.txt is copied to iaminfinity.txt
    • root@kali:~# cp iaminfinity.txt dircommand
    • file iaminfinity.txt is copied to directory dircommand

  15. clear

    It clears the full terminal screan

  16. chmod

    It stands for change mode and it is used to change the permission bits of the given file
      example
    • let i have file named iamtheking.txt and i want it like
    • others can only read my file
    • group members can read & execute my file
    • and the user can read, write and execute the file
    • chmod g=rx,u=rwx,o=r iamtheking.txt
    • Here u means user , g means group and o means other

  17. cal

    It is used to display calender on the terminal screen
    Examples
    • cal -y
    • desplays the current year
    • cal -m anymonth
    • displays the month of the year written at the place of variable anymonth

  18. cmp

    It is the linux command used to compare two files of any directory byte by byte
    If the two files are differ, then it will specify the byte and the line number where they are different
    Example
    • root@kali:~/Desktop#  cmp iamtheking.txt iaminfinity.txt
    • iamtheking.txt  iaminfinity.txt differ: byte 10, line 1
    • root@kali:~/Desktop#  cmp  -b  iamtheking.txt  iaminfinity.txt
    • iamtheking.txt  iaminfinity.txt  differ:  byte 10, line 1 is 153 k 151 i
      Here -b is used to display the bytes that are different from each other
    • root@kali:~/Desktop# cmp -l iamtheking.txt iaminfinity.txt
    • 10 153 151
      11 151 156
      12 156 146
      13 147 151
      cmp: EOF on iamtheking.tx
      Here -l is used to output the differing bytes numbers and their values

  19. comm

    It is the linux command used to compare two sorted files on a line by line basis
    • Examples
    • comm  iamtheking.txt  iaminfinity.txt
    • sorted files iamtheking.txt and iaminfinity.txt will be compared line by line
    • With no options, produce three-column output. Column one contains lines unique to iamtheking.txt, column two contains lines unique to iaminfinity.txt, and column three contains lines common to both files.
    • we can also use options
      -1 suppress column 1 (lines unique to FILE1)
      -2 suppress column 2 (lines unique to FILE2)
      -3 suppress column 3 (lines that appear in both files)
      for eg,
      comm -1 -2 iamtheking.txt iaminfinity.txt
      it will display lines common to both files.

  20. curl

    It is a tool to transfer data from or to a server, using one of the supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP). The command is designed to work without user inter‐ action.
    • To recover a webpage and display it on the command prompt
    • curl http://hackingbylinux.blogspot.com
    • To show header info also, the command is
    • curl http://hackingbylinux.blogspot.com  -i

2 comments:

  1. I got my already programmed and blanked ATM card to withdraw the maximum of $5,500 daily for a maximum of 6 years. I am so happy about this because i got mine last week and I have used it to get more then $350,000 and ready to pay more. United Hackers is giving out the card just to help the poor and needy though it is illegal but it is something nice is not like other scam pretending to have the blank ATM cards. And no one gets caught when using the card.
    WhatsApp: +351 965 761 372
    Email : unitedblankatmhackcard@gmail.com

    ReplyDelete

  2. Are you interested in the service of a hacker to get into a phone, facebook account, snapchat, Instagram, yahoo, Whatsapp, get verified on any social network account, increase your followers by any amount, bank wire and bank transfer. Contact him on hackintechnology@gmail.com +12132951376(WHATSAPP)

    ReplyDelete