Really Friendly Command Line Intro
hellowebbooks.com
hellowebbooks.com
At the same time, the hand drawn windows probably make the tutorial less intimidating to the target audience-of which I'm not a member. But got me pondering how I can improve my own documentation in a few areas.
Curious what others might think.
I imagine for an intermediate/expert audience who has established an intimate relationship with the intricacies of the actual UI, screenshots could work fine. For people who barely have an idea of what this thing is, cutting the cruft in a friendly way is good.
Print one out and give it to a friend, see what they think. :)
When setting up Python (and really most languages), you end up needing things like sudo.
Really it was one of the missing pieces of content that beginners needed to get into Tracy's other books like https://hellowebbooks.com/learn-django/.
If you haven't seen it before, an ancient but worth-thieving-from example of a beginner programming manual is 'The Applesoft Tutorial'.
Thanks for all the nice comments!
I made this specifically for folks who've only used GUIs and are used to having a designed shell around everything they do. That's why I illustrated the windows — at the small expense of readability, the goofiness/friendliness makes the topic more fun and less intimidating.
As shazow mentioned, I'm working on specific Linux (very few changes) and Windows versions (including instructions on using the Linux subsystem), and hopefully doing others on topics like git and whatnot — same model as this one, no signup forms or payments. That said, I am looking for sponsors to help fund my time in making these. If you (or your company) is interested, send me an email at tracy@hellowebbooks.com :)
One advantage of using illustrations is that they are more or less timeless as symbolic representations of the GUI. Novices can get distracted by screenshots that have minor differences from the OS versions between the author's and the readers'.
> In the example above, you see my username "limedaring", and my computer name, “Orion,”
but the examples say "username@computer".
Another nitpick, I wonder if readers might see the commands in uppercase and think that those should work too. I can imagine them seeing "command not found" when trying them out and not realize that it's because LS != ls to the shell.
Yet another, maybe it'd be a good idea to include `cp -r` and `cp -rv`. I don't know, it might add to the intimidation, but I imagine that's also a basic operation they'll want and miss when doing `cp dir/`.
Great work, by the way. CLIs are great and in many if not most cases far more powerful than GUIs, but they're often taken as old and useless by the general public because they were more prevalent back before GUIs were common. It's great to see something aimed to be more easily digestible for the general public. Maybe CLIs can get more appreciation this way.
> Go back too much? Use ls to see what’s in the directory you’re in, and then use cd to head back to where you want to go:
In my experience, if I get lost with `cd`, the best way for me to figure out where I am is not to execute an `ls` (because I might be in a folder with no contents, or somewhere with ambiguous content), I would recommend `pwd` ("print working directory").
If you have a friend or coworker who is looking to get more comfortable with their terminal, I highly recommend printing one of these out. It looks great in-person.
It just tells someone who wants to learn the CLI how to do the things they already know to do with some file browser. What I am missing are the things you can do with the CLI only and which make the CLI so special e.g. pipes.
In general, it is kinda hard to chain GUI programs together and that is exactly where CLI tools are great. While I would certainly agree that it is too hard to start explaining what curl does, maybe coming with some process management example would be simple enough (many people know how to close some program via a task manager). Another good example might be to execute some command every few seconds (e.g. watch du -sh).
I don't want to be negative here, especially because I appreciate simple and straight forward tutorials, but I think that tutorial could be even more valuable with some better examples. Maybe in some part 2?
The target audience is beginners who are just trying to learn programming and things like that.
Pipes are cool, but that's more intermediate/advanced. Maybe there will be another zine in that vein! For now, Tracy is working on an intro to Git zine which is higher priority.
EDIT: Put in another way, the intended audience is not people you need to convince to use the CLI, it's people that already want to try it, but find it scary.
I think the biggest break-through was when I was starting to write scripts as it taught me the rather complex syntax of conditions and loops (complex because whitespace is so important), but I would agree that scripts are a bigger beast.
I think people who try the CLI but are not shown the true power of the CLI will eventually return to their GUI tools as they don't have to remember strange commands and read long man pages.
The only thing that looked potentially confusing was calling "cd .." a way "to step back". It could sound like a way to go to the last directory you visited instead of a way to go up a directory.
Also, bash offers a directory stack you can use:
pushd pushes the current directory to the stack and cd`s to the specified directory.
popd pops the top directory from the stack and cd`s into it.
Not quite the same thing as cd -, but still useful to know.
Right, the distinction I was drawing is just that the shell potentially does chdir("..") when you run "cd ..", but it can't do chdir("-") when you run "cd -". It's true that in both cases the shell has to make the chdir syscall rather than running an external program.
I just did "strace -e chdir bash" and noticed that in fact, my shell doesn't do chdir("..") at all in practice, presumably because it wants to maintain a clean notion of PWD that doesn't contain a complex series of relative paths.
More probably, it's so that things don't get confusing for the user with symbolic links to directories. If you cd to a symbolic link that leads to a directory, `chdir("..")` goes to the parent of the target, while `cd ..` goes to the parent of the source. In other words, `cd dir/subdir/; cd ..` will always get you back to dir/, but if it used chdir("..") it wouldn't always.
I wish ls colors were on by default though, it makes it much easier to know what is and isn’t a directory. (“I can make this easier by typing some magic that you don’t need to understand yet” isn’t a great tutorial process)
With Windows, the recommendation is to install the Linux subsystem, then things end up being the same (give or take some UI).
If your friend gets confused, would be curious to hear what the problem was. There is also a related forum/community here: https://discuss.hellowebapp.com/
Blog Post: https://daniel.haxx.se/blog/2016/08/19/removing-the-powershe...
PR: https://github.com/PowerShell/PowerShell/pull/1901
RFC: https://github.com/PowerShell/PowerShell-RFC/issues/16
Decision: https://github.com/PowerShell/PowerShell-RFC/blob/master/X-R...
For one, they won't act the same. For two, Powershell has a much more consistent and well-named set of commands, which also have their own short alias names by default, and of course you can make your own aliases.