what helps people get comfortable on the command line? https://jvns.ca/blog/2023/08/08/what-helps-people-get-comfortable-on-the-command-line-/

Would love more stories of things that helped you in the last ~5 years!

(as usual, no need to reply if you don’t remember, or if you’ve been using the command line comfortably for 15 years — this question isn’t for you :) )

What helps people get comfortable on the command line?

What helps people get comfortable on the command line?

Julia Evans
(I've gotten really into posting "please don't reply if X Y Z" disclaimers on mastodon for my questions because otherwise I always get a lot of irrelevant replies like "I don't know but here's some speculation" or ”I started using the command line on my apple II” and it's just not helpful. Seems to be working so far!)
@b0rk so, people actually read the full message. I would not have bet on it
@b0rk I've had so little luck with "please, I am B E G G I N G you not to just google this for me" warnings.
@davidr yeah people are so annoying on here sometimes. trying to push back on the reply guy culture a bit to make it livable for me and I think I'm slowly making some progress but it's hard
@b0rk Would love a Pocket Guide To Squashing Reply Guys...
@b0rk It was kinda cool/weird to me to realize that I got comfy with CLI tools more than 5 years ago!
@b0rk I have appreciated the restrictions being stated and have not replied where I almost fit the question because of them. I especially like it when it is stated as “I’m looking for x to better understand the experience from the point of view from y” so I can understand the reason behind the restrictions.

@KennySpade that makes sense! maybe i'll try that. here the reason is that I want tips that are likely to help people learning *today* and what helped someone 20 years ago is less likely to be useful today

(for example someone told me that what helped them 20 years ago was installing Gentoo, which is great, but I think Gentoo is kind of out of style now and I would not recommend it to someone learning in 2023)

all of that is a lot of words though

@b0rk for me, just the first bit about what helps people today would be enough. The way my brain works, if I’m told not to do something, I always have to try to figure out why, so a simple reason that makes sense is enough. If a reason isn’t provided, I might subconsciously make one up, and it might not be a good reason or anything close to the actual reason. I was the kid who would never accept “because I said so” as good enough. 😅
@b0rk thanks for the brief moment of introspection in which I am stunned to realize that I have indeed been using the command line for almost exactly 15 years. Dang! How did that happen???

@b0rk thank you for putting these disclaimers. By making your intentions so clear, it is easy to us readers (or at least me) to know when/how to answer.

These disclaimers are probably annoying to add, but I hope not too annoying, because they look like a great idea!

@brandizzi i'm glad they help! i don't really mind doing it :)
@b0rk I appreciate it as someone who has submitted such replies before (sorry) and welcomes the clear, explicit delineation that these replies aren't helpful. Saves me time and you frustration. Everyone wins.
@boredzo no worries! it's hard to blame people for replying in a way I didn't want when I didn't explain what I wanted :)
@b0rk Thank you for doing that! I should know enough to not reply with "can't remember" or the like, but I'm grateful for the reminder anyway!

@b0rk Just speculating, but have you ever tried a second post that says something like "and if you have used a command line for decades and have an interesting story, tell it here"?

I imagine that there are a lot of people who really want to participate. If there's a place where they're allowed to do that, maybe they'll be less likely to talk in the space you set aside for other people.

@b0rk I have a leg length discrepancy and there’s a real need for sharing info and resources on this topic because off the shelf solutions suck, but reply guys prevent this. If I dare ask a question all the replies are “are you sure it’s not functional?” (According to 2 orthos, 1 rheumatologist, and 5 physios it’s anatomical, but explaining that in a question doesn’t help) so at this point I’ve done years of extreme trial-and-error DIY, but can’t even really share the knowledge gained.
@holly @b0rk I've had insomnia for over 20 years. People still suggest "solutions" to me whenever they find out I have insomnia. Like I haven't tried everything in a two decades...

@b0rk for me, it was inspiration, then stubbornness.

Some of Gary Bernhardt's videos inspired: https://youtu.be/ZQnyApKysg4 and a video I cannot find: "A raw view into my UNIX hackery". This post also inspired: https://adamdrake.com/command-line-tools-can-be-235x-faster-than-your-hadoop-cluster.html

Then stubbornness to solve problems from the command line when I could. This mostly leaned on search-fu, with no standout resources I can recall.

It was primarily the desire and glimpse past the horizon that spurred me to spend the time necessary to learn.

Cascadia 2011 - The Unix Chainsaw by Gary Bernhardt

YouTube
@greggyb great answer thanks

@b0rk I just realized that XKCD was also a strong inspiration for me. I loved the comic, and wanted to be cool like Randall, which included being conversant in UNIX lore enough to appreciate his jokes.

Yes, "cool" to me means appreciating humor about tar and git.

@b0rk Setting the bash history to unlimited and aliasing a shortcut for "history | grep" were fantastic for me

@lynndotpy Oh, Atuin might something for you then!

[email protected]

@lynndotpy setting bash history to unlimited is such a great tip, thank you!
@lynndotpy @b0rk Ctrl+r in combination with fuzzyfinder https://github.com/junegunn/fzf
GitHub - junegunn/fzf: :cherry_blossom: A command-line fuzzy finder

:cherry_blossom: A command-line fuzzy finder. Contribute to junegunn/fzf development by creating an account on GitHub.

GitHub
@b0rk "forced to solve a problem that requires it" seems to be a common thread here! Mine was trying to get CUDA working on a home computer years ago. Watching Gary Bernhardt's Destroy all Software screencasts really made some things click too.
@b0rk 1. discovering that copying /moving files is so much easier on the command line. 2. the desperate need of having a lot of data stuck on a server I only can access via the shell. nothing like desperation to teach you stuff
@b0rk 3. jealousy. someone I hired would navigate their system entirely using the command-line and it made me insecure. for about 2 weeks i tried to emulate him. then I remembered that I am grown ass man.

@b0rk for me: autocomplete, learning to search back in history and learning the ctrl-* shortcuts to move around and edit what I found into what I want. Each of those felt like a productivity/success/happiness multiplier when I started using it.

I have a hunch that LLM(“AI”)-assistance will join this list soon; just waiting for some solution to get sufficient traction to try that out.

@b0rk A lot of what I've done over the years is to force myself to use the thing I'm trying to learn instead of getting it done "how I know how to do it/have always done it." Scripting languages, shells, editors, new tools or utilities or environments.
@steevmi1 @b0rk I forced myself to learn Python that way. I had a process automation task that would've been quicker to implement in Perl but it was straightforward enough to use as a useful non-toy project to learn Python. A few years later I did the same thing to begin learning Rust; I had a project that would've been faster to implement in Python but it was small and useful enough to be a good vehicle for learning a new language. I have far fewer regrets about learning Rust; Python is rapidly joining ColdFusion, Oracle, and SQLServer as technology conveniently omitted from my resume. #ContinuousLearning #DisavowAllKnowledge

@arclight @steevmi1 @b0rk This is how I learn things too - and I've been on the command line for 40 (yes 40) years :-)

Small project and willingness to try a new tool/method/approach in a low risk environment is my key to always learning.

Not being a reply guy - trying to be a supportive go and try it guy.

@rhempel @steevmi1 @b0rk Taking this in the spirit in which it was intended :) I'm revisiting Rust and looking at porting some existing projects - they work fine as Python apps but are a nightmare for non-developer users to install. I don't need 90% of Rust's important features but it's a fairly decent general purpose language that isn't a swirling vortex of abstraction and uncertainty. The low cognitive demands of the infrastructure and abstraction selection make it really attractive for this project.

@arclight @steevmi1 @b0rk Me too for Rust. I'm an old embedded C guy and I was super stubborn about Python because of using spaces as block level delimiters. Finally got over it and love Python now :-)

Skipped C++ and almost every other language and am picking up Rust (slowly) for embedded work mainly because Linus is allowing it for kernel modules :-)

@rhempel @steevmi1 @b0rk My path was BASIC, Fortran, Pascal, VAX assembly, more Fortran, an unexpected and terrible introduction to C, even more Fortran, then whatever came my way or could find on my own. It started witn VB, Perl, SQL, and the late 90s web & sysadmin languages. 6 failed attempts to understand C++ over 15 years (finally made headway in 2018). With easy discovery & access to books (thanks to Google [RIP], Amazon, Half-Price Books, Internet Archive, @bitsavers ) I've been expanding my library to cover APL, ALGOL, COBOL, MUMPS, Forth, Prolog, Ada (especially the provable subset SPARK), SNOBOL4, and so on. I had a good experience with Racket but Scheme/LISP still eludes me. A typo in Haskell locked my machine hard enough to require power cycling so I'm still very suspicious and dubious of functional languages. Maybe ML or OCaml can show me the supposed light. Eiffel, APL, & Rust have been my recent favorites and I need to do more with Forth until I see why people love it.
@b0rk I was
overwhelmed with the number of commands and options that are available. It's important to remember that you don't need to memorize every single feature. You'll memorize the ones you use the most and you can look up the rest.
@RussEby great point, I just realized this with learning to read x86 assembly too (I thought I had to memorize all the instructions, but actually I can just look them up every time)
@b0rk i had very good teachers in university, and having to use it more and more for personal stuff (linux laptop not working correctly after system upgrade, ...) helped also. i keep looking at how other people use it in videos to see what workflow makes it comfortable to use
@b0rk I have two friends one of which is a commandline guru. Years ago, the non-guru friend would often ask the guru to do something for him at the commandline and instead of asking the guru for any explanation or even trying to follow what he was doing in real time, the non-guru would record the entire thing with the script(1) command and then study the typescript at his leisure, looking up all the commands used.
@b0rk I passed this question on to Fastmail's support team, who for the most part start with zero shell experience and work their way up to "use it daily in relatively simple ways”. I'll pass on what I get back.
@b0rk “When I first started to play around with using the command line, one thing I found motivating/helpful was having someone around that was happy to field and answer […beginner…] questions. Once you've learned the basics, it's not too bad, but it can be intimidating at first, and I found (read: continue to find) it all too easy to get lost in documentation and/or get sucked down rabbit holes, so I found it useful to have someone there that could help keep me on the right track.”

@b0rk
A: learning how to change the appearance (colours, fonts, opacity, adding neofetch to the .bashrc or the like) to make the terminal look a little more fun and pleasant to look at 😅

B: honestly there was definitely a shift after i made my terminal pink LOL

@rjbs thank you!
@b0rk (This question seems to have spawned a plan for an internal "shell fundamentals" course/refresher given by plumbers (tech staff) to support, so thank you too! I'll tell you if we learn pedagogical things!)

@b0rk Autocomplete goes a very long way. The `cheat` thingy is nice, but being able to just hit `[tab]` and see my possibilities helps _so_ much when writing a commandline.

Unfortunately it's non-trivial to setup. zsh/oh-my-zsh, which you already mentioned, has support for it, but still you have to enable autocompletions as plugins.

@b0rk One trick I like is to make it super easy to lookup man pages. I run my shells inside Emacs and I setup a keybinding that pops up in another window the man page for the command at the cursor —so I can keep typing the command while looking at the man page. I bet it would be easy to do the same in, say, Vim or even screen or tmux, with the man page showing up in a split.

@b0rk better error messages.

Silent failures and incoherent "man" pages absolutely did not help.

@b0rk I switched to fish and my « command line » usage was made a bit easier and I use many fzf powered workflows (find file below ., go back in history…)

@b0rk (I am in the 15+ years command line user group now, but anyways):

- batch processing tools - for me this was the "rename" tool for renaming a lot of files at once. This would be very long and error prone to do with a GUI filemanager, so it was worth the time learning a command line tool
- making yourself comfortable: there is a lot of configuration and settings, and a few changes can make a huge difference! (for me, it's making my prompt red when a command errors, and green otherwise)

@b0rk ctrl-r without a doubt

@b0rk having them broken down, at first I didn't even understand what apt-get does, but then someone on YouTube broke it down and it was quite easy

Same thing with xargs, awk, etc... They still sometimes look like blackmagicfuckery but just breaking them down bit by bit makes it eas{y,ier}.

@b0rk actually, I think I know why, back then, my English wasn't that good as well.

`apt-get install` was easy to figure out, but "purge" was hard to memorize because I didn't know what the word "purge" meant.

@kQuote03 such a good point thanks
@b0rk 1. Fuzzy search history (like fzf)
2. Recently I've actually started using copilot CLI. Actually convenient for tasks I do not do as often. "?? grep hidden files"
@theodorc how do you use fzf? a lot of people have mentioned it but I've never quite understood how people are actually using it in practice
@b0rk just a replacement for Ctrl+r backward search. It's the method that introduced me to fzf. I think it's part of the install that you can add the keybinding. Probably something "history | fzf" but I'm not sure. :/