Hey there past me. Hope you're doing well and keeping the horrible regrets to a minimum. I'm here to help in that regard. At least with career-rela...
For further actions, you may consider blocking this person and/or reporting abuse
This is awesome! I love reading different people's approaches to teaching something to a beginner. I like that you took the time to explain what a shell is and why it's useful, because I didn't get that when someone showed me a shell for the first time and I wish I would have.
A couple gotchas to add for newbies:
my_var="Soup"
is right, butmy_var = "Soup"
will cause errors. The bash shell uses spaces to separate commands from their arguments and split strings into lists, so doing it the second way will make it think you're trying to run themy_var
command with first argument "=" and second argument "Soup".Anyways, great post! Thanks again :)
Thanks for the feedback! Good point about the variable names, this article is a pretty broad overview so its no surprise I missed a few details like that. But they, I can always write a few follow-up pieces too.
I agree about it being good to explain why the Shell matters. I think that's actually the most important detail for me, since in the start when I researched it, there's no shortage of guides about how to use it. But until I really understood the why with the Pragmatic Programmer, I never saw why it mattered so much to stick through the learning process and bring that all back to my career. That's likely the part of the article I'd have wanted the most for my past self haha.
Yep, and I think you definitely did a great job at that!
"Vim is, at its core, a text-editor. It's built into the Shell"
This isn't true (that Vim is built into the Shell). Vim might be in a directory contained in your PATH variable, but it's not built into the shell. (Note that I don't capitalize "shell", and I don't know why you do, but that's quibbling.)
I'm a Unix nerd, through-and-through. I love the Mac. It's a great Unix system. I've heard it has a GUI too, but I stick with Terminal and bash. GUI is probably just a fad.
GUI is just a fad. I laughed so hard when I read that! good job
My fav -
It took me a very long time before I started using that, but 90% of the time I'm going to
ls
after acd
. And because I'm silly, I end upls
'ing twice pretty often...That's true, I often do the same. May add this to my alias list myself.
About vim, you can add
to
.bash_profile
to switch default editor to Nano.Nano maybe is less powerful but much more intuitive for new bash users (to be honest I still use it and don't want invest my time into vim). And another thing that it is almost on all linux distributions as I know so you don't have to switch from nano editor on your local machine to vim on remote instances
Super great article, as someone who loved using GUI's I was pretty against learning terminal at first until I saw how powerful and necessary it was to becoming a Web Developer.
I felt the same for the start of my career too. For git source control I kept using SourceTree due to its GUI until I saw I was missing out on so much of its functionality that way.
Worth mentioning that Bash is the default shell of most Linux distributions. Given Linux is the most popular operating system in the world, and that Bash is available on Mac and Windows too, it's definitely worth learning.
It is getting you to your „home“ directory.
A single „cd“ hit by the enter key, does the same as „cd ~“.
Nope, it's really not. Whatever shell you're using, vim is an application in its own right. Same as the shell is an application.
Most of the time, when I'm installing a new OS, vim isn't even installed by default (but various shell's are).
As a desktop OS, I've tried Yellow Dog Linux, DEC Alpha Tru64 UNIX, and Solaris. (By "desktop" I assume you mean it uses KDE or Gnome or somesuch, and is GUI based with a mouse.)
As a terminal-style OS, I've used Microsoft Xenix. (That was before Xenix was spun off into SCO... and we all know how that story ends.)
I've not used OpenBSD nor FreeBSD. But since I'm a Theo de Raadt fanboy, well OpenBSD is more my bag. On a lark, I have used Darwin for about a week, which owes some lineage to FreeBSD.
All that being said, I also have a warm spot in my heart for Amiga. I am sometimes tempted to get the latest Amiga -- currently A-EON's AmigaOne X5000. But then I open my wallet and see the tumbleweeds blow out of it.
Follow on, my fav unmentioned commands are:
Very simple and to the point, funny that I've been using a linux shell for 27 years now but I actually took the time to read your article just to see how you did! I guess you drew in my interest somehow, lol. The shadow knows. Anyway, you did great and clearly are talented with such things! Keep up the good work and before too long opensource will finally take over the world!
:)
Karl (linuxkarl615)
Great!
Brilliant post Max!
Aww shucks :)
I've used the shell quite a bit out of necessity, but this high-level overview has done wonders for bringing my existing knowledge together as well as making me want to learn more!
This should be
home
and notroot
,/
would be the root directory!"You use a Mac, since you have a soul and all" - very weird assumption :) but i like the rest
It's not a assumption, he wrote's to his self in the past, so he know's that he uses a Mac since he have a soul ;)
Nice! Thanks dude!
Appreciate the way the subject is dealt and made attractive, right from the start.
Kudos..
Great post! 🙌
You should check out this Open-Source Introduction to Bash Scripting Ebook on GitHub as well!:
github.com/bobbyiliev/introduction...
Amazing, Amazing, Amazing !! thanks so much, it's really the shell introduction i wish i had!
Alas, the software I write has to run on macOS.
Not sure how easy it would be to setup a toolchain on FreeBSD to produce macOS executables. (I'd probably pick OpenBSD over FreeBSD.)