#1
  1. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Sep 2006
    Posts
    2,042
    Rep Power
    535

    20 things a newbie should commit to memory


    I am still very green when it comes to Linux/Unix. I read a book or a tutorial, and get overwhelmed by the amount of detail.

    To ease this learning curve, can anyone suggest some must know facts/commands/concepts? Below are several I identified. I am not looking for everything, but as the title suggestions, just the top 20.

    Thanks

    1. bin and sbin files are available by default (reference $PATH)
    2. Piping
    3. Directing inputs and outputs
    4. Most commands have both a long version and short version option (i.e. ls --all and ls -a). Is the one versus two hyphens universal?
    5. How devices are like directories in /dev
    6. Logging on as root using su
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    15
    Rep Power
    0
    Originally Posted by NotionCommotion
    I am still very green when it comes to Linux/Unix. I read a book or a tutorial, and get overwhelmed by the amount of detail.

    To ease this learning curve, can anyone suggest some must know facts/commands/concepts? Below are several I identified. I am not looking for everything, but as the title suggestions, just the top 20.

    Thanks

    1. bin and sbin files are available by default (reference $PATH)
    2. Piping
    3. Directing inputs and outputs
    4. Most commands have both a long version and short version option (i.e. ls --all and ls -a). Is the one versus two hyphens universal?
    5. How devices are like directories in /dev
    6. Logging on as root using su
    6. Learn how to use the man pages
    7. Exercise with text manipulation tools like awk, sed, cut, uniq, sort, etc. (i guess this might fall under piping as well)

    Comments on this post

    • NotionCommotion agrees : Yes for man pages!
  4. #3
  5. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,453
    Rep Power
    4539
    Remember linux filenames are case-sensitive.
    Learn how to interpret your system log files.
    Learn how to install/update software on your particular distro
    Setup ssh so you can access your linux computer from anywhere. Then get a few windows ssh tools like putty and winscp.
    Locate good support forums on the web for your distro.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    59
    Rep Power
    3
    Remember that linux filenames can have spaces in them. Be careful you don't create a file like this! You will make your life much more difficult if you get a filename with a space in it.

    Top Twenty Linux Commands to REMEMBER

    1 echo $PATH ===>Show list of locations, Left to Right, to be searched for executable
    2 which ls ===>Use to find the location of a command to be executed
    3 ls -ltr * ===>Know what each of the first ten characters means
    4 cd ../ ===>Set current directory to next higher directory
    5 cd ralph ===>Set current directory to ralph (must be a subdirectory of current directory)
    6 pwd ===>Show current directory name
    7 cp tony tony.bak ===>Copy file tony to a new file & call the new file tony.bak
    8 date "+%a %b %e, %Y %l:%M %p" ===>Show current date and time
    9 cd - ===>Go back to previous location of current directory
    10. file jack ===>Show what kind of file jack is
    11 chmod a+r jack ===>Make file jack readable by everybody
    12. less jack ===>List contents of file jack, a screenful at a time
    13. chmod a-w jack ===>Prevent anybody from writing or erasing file jack
    14. nl tee.txt ===>Enumerate lines in file tee.txt
    15. df ===>Show blocks (of free disk space) available on filesystem
    16. head tee.txt ===>Show first ten lines of file tee.txt
    17. tail tee.txt ===>Show last ten lines of file tee.txt
    18. ls -ltr *.txt ===>Show all filenames ending in .txt, in date order, oldest at the top, newest at the bottom
    19. wc -l sedfaq.txt===>Show total count of lines in file sedfaq.txt
    20. wc -c sedfaq.txt===>Show total count of characters in file sedfaq.txt
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Sep 2006
    Posts
    2,042
    Rep Power
    535
    I was about to comment that I didn't have 20, but EEmaestro foiled those plans. I have been going through each, and will continue to do so.

    One comment I have is whether there are any common items that span multiple commands? For instance, I understand that -i is sometimes about interactive and -v is sometimes about verbose. Is this a de facto standard which is applied for many commands? Are there more of these de facto standards?
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2006
    Posts
    2,481
    Rep Power
    1752
    Sadly, pretty much the only standard is that there is no standard, and this becomes more so between Unix and Linux. The -v option often means verbose (with some programs/scripts allowing more 'v's to increase verbosity (such as -vvv)) whilst some other will return version details.

    Not 20, and not comprehensive by any means, but:

    Get to understand the difference between relative and absolute paths.
    Be aware of, and understand, the use of the $PATH environment variable - especially with regard to things run under cron.
    Understand how file expansion/globbing works.
    Even in today's world of faster and better and more, try and be efficient: if you only need filenames listed use ls -1 instead of ls -l (one instead of ell). If you need more information, but not owner or group, look at the ls -log options.
    Know about, and understand, the use of stdin, stdout and stderr (files 0, 1 and 2).
    Know and understand about redirection and piping.
    Do not assume everyone uses the same shell as you do.
    The man pages are your friend.
    Determining information (memory, CPUs, disks, etc.) will be both OS and manufacturer specific.
    Get to learn an editor, of your choice, really well, but be aware of and basic usage of vi which is a common denominator.
    The moon on the one hand, the dawn on the other:
    The moon is my sister, the dawn is my brother.
    The moon on my left and the dawn on my right.
    My brother, good morning: my sister, good night.
    -- Hilaire Belloc

IMN logo majestic logo threadwatch logo seochat tools logo