Learning Command Line

Discussion in 'Command Line' started by jeremy Johnson, Oct 8, 2013.

  1. jeremy Johnson

    jeremy Johnson New Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hey guys,
    I am new to the forum and new to the linux world in general. I just got ubuntu and I am interested in learning the command line. I have a book to learn bash. My question, solely out of curiosity, is how long it will take to realistically learn the command line. I want to be able to use it for the majority of the time. If people would be willing to post their experiences in learning bash, what helped, and what didn't, that would be greatly appreciated. Thank you in advance!

  2. ryanvade

    ryanvade Administrator Staff Member Staff Writer

    Messages:
    1,215
    Likes Received:
    407
    Trophy Points:
    83
    Welcome to the future.

    So, I started learning bash way back.. I would say it took me maybe 2-3 weeks to be completely comfortable. Everything from file creation to moving directories from one machine to another. Don't try to force yourself. Just learn at your own pace. Ubuntu is one of those systems where almost everything is already setup. When you are comfortable with Ubuntu try another distro that requires YOU to set stuff up. I recommend Arch for that kind of thing. When you boot the system, there is no graphics (the live disk anyway). Then you have to do EVERYTHING in CLI. What seems to help is just diving in. Doing everyday activities in the terminal. (moving, deleting, editing files. Reading email *text only*. Installing / upgrading software. )
    nilfs2, Rob and jeremy Johnson like this.
  3. pane-free

    pane-free Active Member

    Messages:
    353
    Likes Received:
    83
    Trophy Points:
    28
    It takes how ever long it takes. Cheat Sheet

    Welcome!
    Rob likes this.
  4. Todd

    Todd New Member

    Messages:
    1
    Likes Received:
    2
    Trophy Points:
    1
    Hello Jeremy! How long it takes to learn the command line is a pretty open-ended question. I've been playing with Linux for several years, and I am still learning the command line. Well, I could be a slow learner, but I think you will find that Linux has a huge set of commands, not to mention writing scripts in BASH or an other shell. Whole college-level courses have been devoted to networking, administration, and security. Personally, I believe the best way to learn the command line is to just jump in and use it. I strongly suggest keeping a notebook or journal, and writing down what you find out about various commands that you use. You would be surprised at how often you will come across a situation where you say, "gee, I solved that problem once, now how did I do it?"

    I also suggest that you have a good reference book next to your Linux box. The book I recommend is O'Reilly's "Linux In A Nutshell" 6th ed. by Siever, Figgins, Love, and Robbins. This is a true reference book, like a dictionary, where commands are grouped by task, and alphabetically and each command has an explanation, switches, and examples of usage. It weighs in at over 900 pages. It is Linux distribution independent. It also covers BASH, the common command line editors, sed, awk, and a whole lot more. Now, notice I said reference book - this book is not a tutorial on how to use Linux. It is much like an encyclopedia covering the command line and other tools.

    I am talking pretty low tech here with notebooks and physical reference books, but it is pretty hard to be learning something at the command line and looking up something online, both at the same time. Having said that, I think you will also find that googling commands and other things you run into in using Linux to also be an excellent source of information.

    It helps also to have some particular tasks in mind. For example, get an older box and load the minimal install without the GUI, or load the server version. Ubuntu has both. Try setting up a network so that your main box and the older box can "talk" to each other and share files back and forth. I have 4 computers in my little network: I have a Windows 7 desktop, an Ubuntu Desktop, a network "server" running headless and at the command line. It provides storage, web development, and printer services to all the other computers. And I have a really old box (~12-14 years old) with just 128mb of ram running headless and at the command line, that I use for Linux programming, particularly assembly language. I haven't had this much fun playing with computers since the DOS days! Linux really does bring the fun back into computing. I've learned more about Linux networking, programming, and command line stuff doing this than in any structured college course. Good Luck, and have a lot of fun!

    ~todd
    nilfs2 and Rob like this.
  5. Machin Shin

    Machin Shin Member

    Messages:
    59
    Likes Received:
    47
    Trophy Points:
    18
    I agree with what others here are saying. The best way to learn is to just dive in and play around. One of the things I would recommend is to learn the "man" command and make it your friend. Linux has an amazing amount of documentation built right into the system. If you ever have a question about what a command does or how to use it just use "man command" and it will provide a manual for whatever command.
    Phedup and Rob like this.
  6. smpl

    smpl New Member

    Messages:
    2
    Likes Received:
    4
    Trophy Points:
    3
    As mentioned by Todd earlier in this article, you will always be learning new things about the command line. I primarily learned simply by wanting to know how to do something in the command line, then googling it. It is very simple.

    Here are some commands to get you started playing, you can even pipe commands from one to another by using the | key.

    ls List the contents of a directory
    echo sometext Print sometext to the terminal
    nano somefile Edit somefile like a normal human being
    vi somefile Edit somefile the (inefficient) geeky way
    sudo somecommand Run a command as root
    sudo apt-get install somepackage Install somepackage (assuming you are on Ubuntu or Debian type distro)
    fortune | cowsay Have an ascii cow read you a fortune, requires the fortune and cowsay packages, great example of piping commands

    I wish you luck on your adventures :)
    Phedup and Rob like this.
  7. Rob

    Rob Administrator Staff Member

    Messages:
    573
    Likes Received:
    187
    Trophy Points:
    43
    Great answers in this thread!

    I'll add that you'll always be learning things when using the cli. I've been using Linux for a long time (since 96ish?) and an still learning new things.
  8. Kovax

    Kovax Member

    Messages:
    34
    Likes Received:
    17
    Trophy Points:
    8
    There is so much to learn and I don't think any of us out here know it all (as we work with different distros). You have to just jump right in and start slow. I learn something new everyday. I had an interview last year and some of the senior guys asked me what was in the /var/etc directory. It seemed like an odd question at the time and my answer to them is what got me the job.
    Just stay in the "shell" and it will all come natural in time.

    Good luck
  9. B4RTZ4K

    B4RTZ4K New Member

    Messages:
    19
    Likes Received:
    13
    Trophy Points:
    3
    Try INX this is a small operating system that has a built in tutorial. It is not graphical user interface only terminal.

    goto:
    inx
    maincontent
    net
  10. DevynCJohnson

    DevynCJohnson Well-Known Member Staff Member Staff Writer

    Messages:
    1,214
    Likes Received:
    1,019
    Trophy Points:
    113
    If the OP wants to learn the GNU/Linux command-line, then why are you suggesting a different OS?
    Haider92 likes this.
  11. arochester

    arochester Well-Known Member

    Messages:
    807
    Likes Received:
    259
    Trophy Points:
    63
    @DevynCJohnson
    It could be argued that INX is not a different OS. It is a LiveCD and based on Ubuntu...BUT it is a bit old, being based on Ubuntu 8.04.

    A useful link, not mentioned above is http://linuxcommand.org/
    Phedup and DevynCJohnson like this.
  12. DevynCJohnson

    DevynCJohnson Well-Known Member Staff Member Staff Writer

    Messages:
    1,214
    Likes Received:
    1,019
    Trophy Points:
    113
    Thanks! I have never heard of INX, so I thought B4RTZ4K was recommending some Unix system.
    Haider92 likes this.
  13. ryanvade

    ryanvade Administrator Staff Member Staff Writer

    Messages:
    1,215
    Likes Received:
    407
    Trophy Points:
    83
  14. B4RTZ4K

    B4RTZ4K New Member

    Messages:
    19
    Likes Received:
    13
    Trophy Points:
    3
    As a newby i was looking to learn the terminal to.
    I looked around and have checked many (linux,unix) Os's.
    Correct me if I am wrong but most linux Os's are unix based.
    So on my way I encountered INX and it's just a fun way to learn the basic terminal commands that are similar to ubuntu terminal, linux mint terminal, backtrack terminal, and some more. It's tutorials are to get used of the navigating in the terminal like ls, cd, find, pwd, and more. A while ago I started reading
    LINUX: Rute User's Tutorial and Exposition
    This book is online available and for free. I recommend it for beginners and novice users.
    Phedup likes this.
  15. DevynCJohnson

    DevynCJohnson Well-Known Member Staff Member Staff Writer

    Messages:
    1,214
    Likes Received:
    1,019
    Trophy Points:
    113
    All Linux systems use the Linux kernel. Linux is Unix-like and Linux is not a Posix system either.
    Haider92 likes this.
  16. B4RTZ4K

    B4RTZ4K New Member

    Messages:
    19
    Likes Received:
    13
    Trophy Points:
    3
    Ah I am gonna have to read your thread on a kernel and look up what a Posix system is.
    Mmhh more food for tought:)
    Thanks for reply
  17. Cyber-Berserker

    Cyber-Berserker Active Member

    Messages:
    232
    Likes Received:
    138
    Trophy Points:
    43
    If the OP was interested in answers, he/she would have made at least one more post in the last 4 1/2 months. If this thread benefits anyone, it will not be the OP. (I hate drive-by posters.:mad:)
    B4RTZ4K likes this.
  18. DevynCJohnson

    DevynCJohnson Well-Known Member Staff Member Staff Writer

    Messages:
    1,214
    Likes Received:
    1,019
    Trophy Points:
    113
    A Posix system is any operating system that follows the Posix standards (http://en.wikipedia.org/wiki/Posix).
    Haider92 likes this.
  19. ryanvade

    ryanvade Administrator Staff Member Staff Writer

    Messages:
    1,215
    Likes Received:
    407
    Trophy Points:
    83
  20. Phedup

    Phedup New Member

    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hi Girls 'n Gyus,

    "If you have to ask, it aint" CLI.
    "How do I get to Carnegie Hall?"
    "Practice, practice, practice."
    Don't let 'em get u down.:cool:
    Last edited: May 1, 2014

Share This Page