Tools are believed to be a major factor in the evolution of humankind. If we didn’t have tools, like wheels, shovels, computers or the internet we just would not be very productive. One of the tools that has shaped the digital revolution is the command-line interface (CLI), also known as the terminal or console.
What makes a CLI so effective is the brilliantly simple way it allows you to control a computer using text based commands. There is no graphics or buttons or mouse. Just you, the keyboard, and the machine. It’s quick. I can’t even begin to describe how much more efficient I am on linux than say windows for common tasks. Want to backup your cat gifs?
cp /images/cats/*.gif /gifs/cats/
The thing about your terminal is that it’s personal. It’s intimate. You know it like the back of your hand. Where your files are is in your head, neatly arranged to your personal preferences. You can change the colors of the text and background to form a sort of new age coat of arms. Here’s mine:
I understand that it might look scary, but it’s pretty simple once you get your head around it. There are some good guides and once you dive in it’s actually pretty fun. Right now is an exciting time in CLI, even after 40+ years there is still much innovation to be had in the shell space. You will likely start with Bash, move onto Zsh, or maybe even try out Fish like me.
Here are some terms layman’s terms (please correct me if I’m wrong or have any suggestions)
shell = “The interface that accepts your input and runs software for you”
prompt = “What you see in your shell when it’s waiting for your input”
script = “File with code that consists of commands to be ran by your shell or programming language”
dotfiles = “Collection of invisible configuration files residing in your home folder”
linux = “A class of operating systems that use the linux kernel”
*nix = “A class of operating systems consisting of unix and linux”
root = “The most powerful user, has total access to everything and everyone”
Oh ya, this was meant to just be about how I got rid of messages whenever I open up a shell, hence “Zen” and all, so here’s how I make Ubuntu, Fish, and SSH keep quiet.
#!/usr/bin/env fish # Ubuntu Message of The Day if test -f /etc/update-motd.d/* chmod -x /etc/update-motd.d/* end # Fish Shell Greeting set line1 "# Don't Show Fish Greeting" set line2 "set --erase fish_greeting" echo -e "nn$line1n$line2" >> ~/.config/fish/config.fish . ~/.config/fish/config.fish # SSH Last Login set line1 "# Don't Show Last Login" set line2 "PrintLastLog no" echo -e "nn$line1n$line2" >> /etc/ssh/sshd_config service ssh restart
You can go much much much deeper into the rabbit hole, for instance the code to having some fun with fortunes and frogs in my prompt is hosted on GitHub. Here’s what I see when I ssh into my server: