Saturday, January 4, 2014

How Can I Quickly Learn Terminal Commands?

A mouse click will only get you so far in Ubuntu. Learning terminal commands is an important step for anyone who's serious about using "the other OS." The experts at Ask Ubuntu provide guidance on the best way to learn "the shell." It seems to me learning how to use the terminal is a prerequisite to learning how to use Ubuntu. So I'm trying to figure out the best way to learn. Is there a Quizlet online flash card set out there? A better way? See the original question here. Randomized Learning (Answered by Radu Rădeanu) You can add the following line (command) at the end of your '~/.bashrc' file: echo "Did you know that:"; whatis $(ls /bin | shuf -n 1) Every time you open the terminal you will learn something about a random command. If you want some fun, you can use 'cowsay' "utility". To install it, run this in terminal: sudo apt-get install cowsay Then add the following line at the end of your '~/.bashrc' file: cowsay -f $(ls /usr/share/cowsay/cows | shuf -n 1 | cut -d. -f1) $(whatis $(ls /bin) 2>/dev/null | shuf -n 1) Or you can add the above line as alias in '~/.bash_aliases'. I added: alias ?='cowsay -f $(ls /usr/share/cowsay/cows | shuf -n 1 | cut -d. -f1) $(whatis $(ls /bin) 2>/dev/null | shuf -n 1)' Whenever you get bored, you can type in terminal: '?' (followed by Enter). It's like playing dice by yourself. Whatis (Answered by Achu) I used to play with 'whatis'. It's not exactly a game, but it's a relatively easy way to learn. For example, type whatis sudo apt-get update and it returns: ![whatis sudo apt-get update]
Before I execute any command, I hit it with 'whatis' first. I learn what I'm going to do, then I will do the command with confidence. If 'whatis' doesn't provide much information or if it's unclear to me, I will go to and read the 'man'. For example, man sudo. Google gives you so much info here, sources inside Ask Ubuntu and outside. Here, LMGTFY: best way to learn terminal commands on Ubuntu.

No comments:

Post a Comment