Live data from Hacker News

Ask HN: I want to learn to use the terminal, where do I start

news.ycombinator.com

41–50 of 57 posts

Re: Ask HN: I want to learn to use the terminal, where do I start

#43
pick an open source software, like nextcloud or a game and follow the instructions for "build from source" youll get a bunch of errors for some dependency not installed and that will lead you down a rabbit hole of installing and downloading tools and show you commands like make, mv, cd, ls, curl, etc. error messages usually contain a lot more information that people expect.

Re: Ask HN: I want to learn to use the terminal, where do I start

#44
It's hard to give advice without knowing what you do, and why you want to learn to use the terminal... But:

Learn about the command line tools that exist, and actually use the ones that match what you regularly do.

Take small steps, first move a file from the command line. Then, compile your stuff, launch an application. Then use git to commit, pull, push, drop changes. Then learn more git, cherry pick, interactive rebase, stash, diff.

If something feels tedious, and you think "there must be a better way", take a moment to Google if there is a better way. Even if you might not save time (for the first time) , give it a try, and see how long it takes to solve something new.

Make your terminal yours and a joy to use. It might just be me, but I like when my terminal looks and feels great.

Don't make learning an overwhelming experience. It's a marathon, so if on the beginning, you only learn 2-3 tools, that's okay, you'll learn the others when you need them. I picked up Vim (Helix) and tmux only years after I was proficient on the command line.

It's okay to forget stuff... When I worked on the backend, I was good at grep, log tools, etc, but today, I need some time to get things working.

Watch videos about other people's set up, it's great inspiration on what's possible.

Write your own tools, learn what makes an intuitive interface, learn to handle different kinds of flags, arguments.

Learn to type. Practice typing faster.

Learn "terminal adjacent" skills. Learn how to navigate your OS with the keyboard (close tabs, windows, search, lock the screen, launch an app).

Don't be afraid to "toss things out". Some tools are just trash, some tools just don't click for you. If it hurts, stop doing it. If the tool is actually good, you'll hear about it later, at which point, you can give it another go.

Re: Ask HN: I want to learn to use the terminal, where do I start

#46
post #18

Aside: zsh is standard on macs now, thanks to Apple's lawyers freaking out over bash license terms. If you want to change to industry standard bash (I did) then there are three ways to do it. Short: csh -s /bin/bash Others: system settings or terminal settings. [1] https://support.apple.com/en-gb/guide/terminal/trml113/mac [2] https://www.howtogeek.com/444596/how-to-change-the-default-s... You may want to update bash…

I was curious as to why someone would prefer bash over zsh i.e. what are the salient differences, and a brief search led me to this thorough answer:

https://apple.stackexchange.com/questions/361870/what-are-th...

…but I’m still not sure there’s a material difference that would impact me, and I’ve been programming professionally since the mid 90s. If I can ask a side question, why would one switch back to bash from zsh?

Re: Ask HN: I want to learn to use the terminal, where do I start

#47
When you say "terminal" I think what you really mean is a "shell" which runs within the Terminal. Googling for "bash", "shell scripting", "beginner" and "hello world" are likely to lead you to more useful content.

Also, as much as it's helpful to write code, it's also helpful to read code and try to understand what it's doing. Ask lots of questions.

Re: Ask HN: I want to learn to use the terminal, where do I start

#49
I learned a ton from doing “Over the wire”.

After that I read “The Unix programming environment” and after that it clicked.

Story time - a thing I learned from TUPL.

I did an interview at the and they had a bunch of programming questions. One was to write a the shortest script to count lines in n a script ext file. I asked - can I choose language, ANY language?

From the book I remembered the command wc -l in Bash. The interviewer looked at the his colleague gave a small smirk. I felt right at home.

Re: Ask HN: I want to learn to use the terminal, where do I start

#50
"The terminal" is a terminal emulator: just a program that runs a shell. It's easy to learn the MacOS terminal emulator, called Terminal—just read the user guide accessible in the Help menu, under Terminal Help.

But what you really want to learn, I'm guessing, is not just the terminal emulator, but a shell. For that, you'll need to pick a shell and read about it. ZSH is the one that comes standard on MacOS, so you can start with that. ZSH is also just a superset of BASH, so you could learn BASH commands and they'd be mostly applicable to ZSH. Try reading The Linux Command Line: https://www.linuxcommand.org/lc3_learning_the_shell.php.

Post reply on HN