Source: https://unsplash.com/photos/NL_DF0Klepc

Bash: in 5 Minutes or Less

Hands-on command line tips for a Unix-like OS shell

Ryan S.
6 min readJan 3, 2020

--

Housekeeping Items 🏡

In this quick tutorial, we’ll be using the bash shell, but hey — use what you want. My personal favourite is zsh, which can be downloaded using homebrew — more on that tool another time. A shell is basically an interpreter for direct requests to the OS, using a command line rather than a graphical user interface. A “terminal” is a way to access this shell. We’ll be using “<>” to denote when something is a filler. For example, if you see <file name>.txt, that means any text file you’ll use in the example. For most commands there are many options and flags which we won’t cover. Oh, and we’ll use $ as a cursor at the start of commands — you don’t actually type this!

Getting Comfortable 🚶

When diving into new technology, it is a rite of passage to print the famous Hello, world statement. Once you have your terminal open, try the following command: echo Hello, World!. Just like other environments, the shell can handle variables as well. Try setting a variable, and using echo in order to print it. Reference the variable by prepending a $ to the < variable name>.

Creating & Navigating…

--

--

Ryan S.
Ryan S.

Written by Ryan S.

Product Person. Beer Nerd. Traveller. Writes about software, culture, and innovation. In constant search of the best coffee, tacos, and IPAs in a city near you.

No responses yet