Command Line Tools ALL Developers Should Know

104,857
0
Published 2022-10-31
Get $20 off EACH of your first two orders of Cometeer (total of $40 OFF) when you use my code FORRESTK at cometeer.com/forrestk. If you’ve been wanting to try Cometeer, now is the time!

The command line interface. A program that accepts text input to execute operating system functions. It used to be the only way we could interact with computers back in the 60s. And in the 1970s and 1980s, command line input was commonly used by Unix systems and PC systems like MS-DOS and Apple DOS. Today, however, we have lost our way. With GUIs, or graphical user interfaces, most users never use command-line interfaces (CLI). Except for us, the chosen ones. The software developers and system administrators of the world, we use the CLI to configure computers, install software, and access features that are not available in the graphical interface. But not only that, it increases productivity. It’s one of those things where you put more time in on the frontend to learn, but once you do, you will get that time back in droves (10 fold). So in this video, I want to share with you the most prevalent command line tools used today.

Let’s start off with the shell. It is the first thing you see when opening a terminal. But it’s not the same as the terminal. The terminal itself is actually a terminal emulator - a program that opens a window and lets you interact with the shell. That would be your GNOME terminal, Windows Terminal, Xterm, Alacritty. But the shell… In Linux, we usually use the word shell to refer to the main command-line interface on which we execute programs called commands. This would be your C shell, Z shell, Korn shell, Bourne shell, bash, or even Windows PowerShell. It’s the thing that allows interaction between the user and the kernel. So when you type in ls, the shell executes the ls command. The shell can also execute other programs such as applications, scripts, and user programs.
With one of those programs being our next tool, the text editor. Which allows you to edit text using the command line interface, like code, READMEs, and git commit messages. This would be your Vi, VIM, Neovim, GNU nano, Emacs, Gedit, and so on. Some are just basic text editors, like nano, whereas developers typically use more customizable and extensive text editors like Vim, not because they like it more, but because they can’t figure out how to exit.
Some of these command line tools come default on many systems, but many of them you’ll have to install yourself. That’s where our next tool comes into play, the package manager. Package managers ease the process of installing software. You can think of it as an app store for the command line, even before app stores were even a thing. This would be your apt, dpkg, pacman, homebrew. Or you may be more familiar with some application-level package managers such as yarn and npm. A package manager allows you to install, configure, audit, upgrade, or remove software packages and dependencies. From your operating system, in the context of the former list.
Now my favorite tool name, the fuzzy finder, aka an interactive Unix filter. It can be used with any list, files, command history, processes, hostnames, bookmarks, lines of code, git commits, and so on. It’s effectively file search for everything using their fuzzy finder algorithm. So if you know the type of file, or a word in a file name or the file path or commit message or code or whatever, you just run the fuzzy finder and start typing to find what you’re looking for, system wide. Or specify to only search project wide. And the algorithm will filter out everything that doesn’t match. You can think of it as real time grep. It’s incredibly convenient and saves a lot of time.

I know there are many, many more command line tools out there. Which would be the first you’d recommend to a friend? Leave a comment below and enjoy the video.

------------------------

🐱‍🚀 GitHub: github.com/forrestknight
🐦 Twitter: www.twitter.com/forrestpknight
💼 LinkedIn: www.linkedin.com/in/forrestpknight
📸 Instagram: www.instagram.com/forrestpknight

📓 Learning Resources:
My Favorite Machine Learning Course: imp.i384100.net/YgYEBJ
Open Source Computer Science Degree: bit.ly/open-source-forrest
Python Open Source Computer Science Degree: bit.ly/python-open-source
Udacity to Learn Any Coding Skill: bit.ly/udacity-forrest

👨‍💻 My Coding Gear:
My NAS Server: amzn.to/3brqO7b
My Hard Drives: amzn.to/3aKetMi
My Main Monitor: amzn.to/3siQfPa
My Second Monitor: amzn.to/3keHT84
My Standing Desk: amzn.to/3boAcbC
My PC Build: bit.ly/my-coding-gear
My AI GPU: amzn.to/3uvmUmz

All Comments (21)
  • @cdey3886
    I cannot stress enought how much Vim/neovim made me more productive and the terminal overall. I use Fish on Alacrity and my favourite tools are Vim, Ranger, FZF, tmux and of course Git
  • @nikfp
    Oh-My-Posh - awesome prompt styling, extremely customizable as well. Cross platform, multi-shell, supports nerd fonts and glyphs, and has segments for all kinds of things. Doesn't cause any noticeable lag. (It's written in go so it goes!) Comes with a ton of themes available, but it's really easy to customize. I have the same prompt on bash and powershell with segments to tell me which shell I'm currently using, do I currently have elevated permissions, where am I in the file system, current node version (if in a node project), current Golang version (if in a Go project), and exit code of last command. Then, I have a second line that only appears when I'm in a git repo, and gives me all the git information for the repo at a glance. Blinking cursor is on a third line, and I have some unicode bars connecting it all so it looks purdy. I customized it to work well with terminals that are taller than they are wide as I frequently have multiple shells open next to each other in a TMUX split, or the terminal open half screen and a browser on the other half when using only one screen.
  • @JM-tj5qm
    You are the best, the perfect mix of helpful and entertaining. Congrats on 400k
  • @tonyf5869
    That Steve Ballmer clip is always great.
  • Man, thank you so much! I was googling like crazy to find 'tldr', couldn't recall its name. Finally found it in this video. I'm a heavy user of this tool and found it extremely useful
  • @tc_kommark
    Great video! I always heard tmux mentioned in videos, but had no clue what it was. I love using it!
  • @patnickle6959
    Neovim with Tmux to manage sessions (ie one session open per project root directory) is 90% of what I use. There's also zsh with oh-my-zsh, FZF, Git, etc etc, but productivity wise I lean on Tmux a lot.
  • @graybri
    using a tiling window manager was massive for my productivity. when i suddenly had to start teaching online during covid it became clear how much time is wasted rearranging and resizing items in the display. impossible to not include git in the list also. all of the text processing tools in the gnu core utils. finally i think it is important to set aside a liitle time everyday or every week to automate, customize, optimize and simplify your workflow. Whether that is adding a couple of command aliases to your shell, or adding a couple of keybindings to your editor. Even adding some inbox rules to your email
  • @lucidity1230
    grep, Vim, and tmux changed my life in the command line. Cannot recommend those tools enough.
  • @vencemarron
    I think that Windows users will appreciate scoop and oh my posh, which are my main recommendations. I use scoop to get some unix tools in Windows and as a secondary package manager (second to winget) for development stuff (deno, vim, bash, sass, tailwind css, among other programs available in it). Oh my posh just makes the powershell prompt pretty and useful for development to see git status, node status or dotnet status (you can customize it to your needs with the oh my posh docs)...
  • @ambuj.k
    One thing I found very cool in bash/zsh is the Ctrl+R shortcut, it's a reverse fuzzy finder but for your recent commands in the shell; So, I never waste my time pressing the up arrow key.
  • @duscraftphoto
    Great content! I try to live in terminal because I find I can navigate faster cause I’m so used to. I started with Vim and stuck with it. Also, TLDR is definitely the right way to RTFM ha ha. Keep up the insightful content!
  • Neovim with tmux (to manages sessions and windows), for the shell i used zsh with starship for customization, ranger for my file manager, and zathura (even tough this isn't cli tools but it increase my productivity) for reading paper and books. Even tho recently i'm trying to integrate all those tools to be used from my neovim set-up or tmux for maximum productivity.
  • @paechan
    The file browser lf is pretty amazing. Super lightweight and easy to use.
  • Mcfly. A backwards search command tool. I have been using it for a couple of weeks now and it really increases my productivity.
  • @CallousCoder
    Oh and ps I use that a lot especially when writing code to see what the resident size of my program is. Especially when writing a more involved C/C++ application then I want to be sure that it isn’t leaking memory. Even when my code checker says it’s okay I always check. And when I see NodeJS consume 90-150MB for something simple I decide to rewrite it in C++ or Rust because those containers will add up in cost! And since C++ or Rust is even 10 times faster we let definition require 10 times less for the same work load, saving lots and lots of money in the end.
  • @murtadha96
    I install pyenv to install and manage multiple versions of Python, nvm to install and manage multiple Node versions, and Starship to customise the prompt. I also have bat which is a good cat replacement. And batman (yep, that's what it's called) to produce better man pages (with colours and such). exa is also great (an ls replacement) which has syntax highlighting.
  • @Yuanti
    I'll save this for when i screw up my pc again :-)
  • @Chalisque
    The other thing with command line is extensibility. For example, if I keep typing rsync -haux --progress dir1 dir2 myserver:where/ever I can e.g. define a function via rs() { rsync -haux --progress "$@"; } so that instead I type rs dir1 dir2 myserver:where/ever (I use aliases to rename rm to remove to prevent accidently typing rm when I mean rs -- learned that a while back) or I can type cat > ~/bin/rs #!/bin/bash rsync -haux --progress "$@" ^D chmod a+x ~/bin/rs and I have a command than anything can run as if it were an executable. (I do this a lot since it means I can see the terminal above while typing out my program, whereas e.g. vim or nano take over the screen.)