Command Line Tools ALL Developers Should Know
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/for...
🐦 Twitter: / forrestpknight
💼 LinkedIn: / forrestpknight
📸 Instagram: / forrestpknight
📓 Learning Resources:
My Favorite Machine Learning Course: imp.i384100.ne...
Open Source Computer Science Degree: bit.ly/open-so...
Python Open Source Computer Science Degree: bit.ly/python-...
Udacity to Learn Any Coding Skill: bit.ly/udacity-...
👨💻 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-codi...
My AI GPU: amzn.to/3uvmUmz
Пікірлер: 183
Forrest is back
@fknight
Жыл бұрын
Tryna get back on track lol
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
@yash1152
Жыл бұрын
can u remind me what fzf was?
@yash1152
Жыл бұрын
oh 4:32
@davidbreier84
Жыл бұрын
Fish is nice but I stopped using it because I encountered problems while scripting. It's not POSIX compatible and that made it hard to use (for me) unfortunately
@ajalanbrown2200
17 күн бұрын
Ditto I saw my boss using neovim and I was hooked.
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.
@kaseywahl
Жыл бұрын
Oh-My-Posh is part of the reason I started using the command line in the first place--makes it easier to interact with the command line and understand what you're doing.
@sys434
Жыл бұрын
@Nik P add it to the public themes?
@StfuSiriusly
Жыл бұрын
oh my posh?
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.)
That Steve Ballmer clip is always great.
You are the best, the perfect mix of helpful and entertaining. Congrats on 400k
@fknight
Жыл бұрын
I appreciate that!!
grep, Vim, and tmux changed my life in the command line. Cannot recommend those tools enough.
Never getting tired of the not able to exit vim jokes! :)
I'll save this for when i screw up my pc again :-)
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
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
My recommendation is not exactly a command line tool, but it's a prerequisite for using many of them: Regex. If you work with text files at all, you should learn Regex. If search and replace is a pistol, then search and replace with Regex is a freakin jet fighter.
@SimGunther
Жыл бұрын
Also recommend learning about perl regex and Plan9 regex 👍
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.
@icntthinkofanam3
Жыл бұрын
Thissssssssss
@TechJolt3d
Жыл бұрын
There is no way that is soo cool
@SamGrahamgee
Жыл бұрын
ho ma god
@paultapping9510
8 ай бұрын
oh my! That's very useful!
Congrats on the 400k 🔥
"The Chosen Ones" - music to my ears.
I am a muscle memory man, when I used to use terminal and linux, I forgot how to use windows, when I used to use vim, I forgot how to use gedit and so on ...
2:25 "developers typically use more customizable and extensive editors like vim...not because they like it more, but because they can't figure out how to exit." GOLD.
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.
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)...
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.
@analisamelojete1966
Жыл бұрын
Use poetry to handle dependencies in your python projects. That’s a nice tool.
@NostraDavid2
Жыл бұрын
@@analisamelojete1966 Until it breaks because the dev said so. PDM and Hatch are two modern alternatives for when it does.
@graybri
Жыл бұрын
going to check out batman thanks
i’d recommend for people to use zoxide it’s like the cd command but you don’t need to type the full path
It's true, I've been using vim for over 20 years, still can't exit. Though, if grep isn't enough for your searching needs, locate and find can fill in the gaps. You just have to know regular expressions and understand the quirks of the tools.
readline in vi mode .. can't live without it
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!
@darshanrajpattanaik2154
7 ай бұрын
as the low level learning says
0:46 > _"u get back that time 10X"_ for me, its not even just about time. its about maintaining my sanity. these _power user_ things are how my brain keeps poking me about if the thing i am using is not efficient hence making me mad. so, yeah... lack of efficiency makes me loose my mind, not _just_ time.
helix, broot, exa are my vital tools.
I use ZSH + Tmux + NeoVim (highly cusomized). I also keep bpytop (prettier htop) open in one of my panes to monitor make build when executing mulitple runners. I rarely leave the terminal when I'm in a coding session
"... not because they like it more but because they can't figure out how to exit" 😂 classic
I use Oh-My-Zsh, tmux and plugins in OMZ such as autocorrect and suggestions this makes life seriously easy
A terminal or a console, today means just an empty user interface box, you can run any program in it, be it a shell, a game, whatever you like. It is not a required part of the shell. In fact, you can programmatically run shell scripts inside any program, effectively you can run a shell inside another program, direct the shell's stdout to your program and manipulate it, display it, etc.
Mcfly. A backwards search command tool. I have been using it for a couple of weeks now and it really increases my productivity.
0:25 ...except for us! the chosen ones!... I laughed so loud that my deaf cat waked up and looked at me very, very angry... :D
When you said, can't figure out how to exit vi, I laughed out loud and subscribed. 😅
The one that writes your programs for you. That is the ultimate tool.
Fortune and Cowsay for must haves!
Great video, I enjoyed it a lot.
Lol ‘because they can’t figure out how to exit’ made me literally lol while sitting by myself at a coffee shop.
Lazygit is my favorite. Until I use this, I only use add commit pull and push, but now I can use almost every feature of git
halfway throught the video and Ive leared about 'ls' and 'package-managers' nice work dog. this will git you far
ncdu is nice for visualizing disk usage. It''s also interactive.
@scarletscarlet800
Жыл бұрын
gdu is a crossplatform alternative, you should give it a go. (LOL, 'cos gdu is written in go)
Great video! I always heard tmux mentioned in videos, but had no clue what it was. I love using it!
Shell sessions, shell sessions, shell sessions... I actually said it. Great vid 👍
Package manager most important. Brew the goat
0:24 Love the Age of empires on the PC!
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.
JQ is being a life saving tool for me lately, allowing me to make complex json queries with both Azure datafactory and databricks resources.
@otek_
Жыл бұрын
jq rocks!
I highly recommend the book by Neal Stephenson - "In the beginning was the command line."
Neofetch (works best with an arch install)
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.
Hi Forrest Knight. Very good Content. For Windows Packet Manager you should also mention "Chocolately", in combination of windows powershell as Admin. Safes a lot of time. Your Question answered for windows: - totalcommander - lens - dia - vscode - docker - virtualbox - terraform - openssl - kubernetes-helm - nodejs Really great tipps. ;-)
zsh I use an i3 windows manager I have tried a variety of terminal emulators but my favorite is still xfce4-terminal
Let's talk how smooth the sponsors ads was put and transitioned without we even notice
The file browser lf is pretty amazing. Super lightweight and easy to use.
What’s your neovim setup? It looks beautiful :)
I use Konsole and neovim (recently switched from VSCode). I had tmux installed with alacritty and wezterm. I like how I can save my terminal window layouts and bookmark the paths of each instance of the terminal in Konsole. Its support of font ligatures also really great.
Dude, learn the pour-over technique. It's good meditation to calm your mind and prepare your brain for coding work... and gives you great coffee without spending extra
@SimGunther
Жыл бұрын
And it gives you extra coffee for the same beans :)
Two commands I’d recommend find and egrep find probably the more important one for me. Just to find certain files and perform certain actions on it is ideal. The nohup is also important. pushd popd I use that a ton.
I am in Windows Terminal with PowerShell. My favorites are posh-git and ag 'The Silver Searcher'
First of all, Forest looks like Halbrand from rings of power. Second, subscribed. Great video for sure. I recently started to use neovim, still getting used to tmux a bit, been using homebrew, fzf, ripgrep, exa, etc. for a while. Command line tools is lit af.
@exsesx
Жыл бұрын
Starship for visuals btw
@exsesx
Жыл бұрын
Fish shell as well
You should learn and use AWK if you use too much shell. If you need to manage many runtime libs, you need asdf
Nushell have been a game changer for me
Tools that I always recommed are: nvim, tmux and git
emacs can run in the terminal why no mention
tmux, oh-my-zsh, and zsh-autosuggestions are huge ones for me. Lots of tools I use for vim as well. All of these save me a ton of time.
Given the option, I would live entirely within getty on my laptop, but since that's not really practical with the modern web, I tend to use fish on alacritty, neovim (though I have been experimenting with helix), tmux, git (obviously), lynx (a terminal web browser) for looking things up quickly, and the ncurses vlc frontend. I also prefer using bat over cat and less/more, because it has line numbers and it enters a pager (most likely less) automatically if the file takes up more than a single screen. I also experimented with nushell for a little while; it's inspired by powershell but without the object orientation, and is good for displaying data on the screen, but I prefer stuff like zsh and fish.
The multiplexer one seems interesting.. im tired opening many tabs of terminal session and switching it..
I have 'top' running on a second monitor as a simple/minimalist performance readout
For me: - zellij (terminal multiplexer) - zoxide (smarter cd command)
Awesome as always!
istg cometeer is the simple rick's of coffee pods
Iterm2 for mac. I think it's excellent.
Ripgrep, micro, jq. If you’re "strictly" a dev then Starship is super cool too. The latter is a little annoying if you are a wide ranged user when it comes to the cli.
1:35 LOL, where is this from? Do you have a link to the video?
Midnight Commander and MCEdit are my favs Best file manager and best editor :P
I absolutely love CLI. I have 2 laptops one is my gaming pc windows10 stays on that machine. But my hp laptop couple years old I keep arch linux on. It's my main laptop when I just want to surf the web program etc my daily driver if I'm not gaming. I've last year or so have gotten to the point outside of a web browser I've been only using CLI apps. Email, music player, file manager, neovim, irc, discord (rip that 3rd party tool)
I like to use the DOS/DosBox command prompt, because in DOS the user is the big boss and not the kernel of the OS.
I knew it wasn't likely but I was still hoping for a mention of nushell, when you started listing them
So what is Command Line Developer tools on mac?
i recommend tig, also zsh, oh my zsh and autosuggestions feature
Gimme my award
Good start! Better to know these tools well than barely know a ton of tools. Also knowing docker will let you get a lot done. And if you know python, then having ipython available will let you avoid some of the more annoying tools like sed and awk. And while you are doing that, might as well figure out pudb so you can visually debug without a gui.
You should do a project tutorial
PowerShell is a good addition I use often.
@wh7988
Жыл бұрын
🤮🤮🤮
@Don_XII
Жыл бұрын
I just hate its syntax and the way it has "aliases" and stuff otherwise it's fine
@scarletscarlet800
Жыл бұрын
How fast can your powershell launch? I always had mine launch longer than 30s (admittedly my $profile is quite heavily configured), if you just want something simple done, powershell is a nightmare with its verbosity. Bash/Zsh has way less typing.
@Don_XII
Жыл бұрын
@@scarletscarlet800 damn 30s, when mine launches in more than 1 second I feel it's too much. how you feel opening new instances? that seems like a pain. I remember at somepoint it got to 2 to 4 seconds and i don't know why it is so slow to launch my $PROFILE isn't that heavy. even without it it starts kinda slow.
Is that a humidor on the shelf?
nala is a prettier, faster alternative to apt manage your packages, I've set up aliases to do sudo updates and upgrades etc.
vim exit jokes crack me up so hard because i once had to google how to exit vim hehehehe
Wezterm, vifm, nvim, taskwarrior, btop, dua, fasd, many fzf commands as the zsh functions. To be honest, many CLI commands I use in scripts with rofi, so I can bind them to the shortcuts.
@graybri
Жыл бұрын
just getting into rofi a bit now. lots of potential there
Really nice👍
Gotta have nano, I had no idea it's a gnu app before this video tho lol
Yeaaaah, CLI FTW
Seen the age of empires screenshot and nostalgia hit.
How do you have so much time to do all these things
ehh WindowsTerminal on WSL2 with Fish Shell favorite tool tldr, tbh and neomutt for writing/reading emails. Neomutt feels cool, makes my Hotwallets for SmartContract Development more secure(no JS possible^^) and clients feel in good hands if they look over my terminal based workflow.😅 No joke, I just got hired for a project over others, because on a screensharing session I used my terminal with the retro blue colorscheme. I said it clearly thats just for the show, later I heard the only thing that sticked is that I use a bluescreen and I'm a professional Hacker, because I said I participated on a small Hackathon on the weekend.😅 Show, don't tell is true in so many areas😂
@fknight
Жыл бұрын
WSL2 is absolutely amazing! Such a good tool for someone who needs Windows. Never used Neomutt but it sounds cool. I'll have to check it out. And that story is great, lol!
Anyone have a similar config for the neovim UI shown at 2:19?
The best shell command I recommend is git
Why is no one mentioned nala?
nvim would be my first but if we’re going by what you didn’t already mention then git
because of the memes, I made sure I had memorised the command to exit vim before I ever even opened it!
its not really a command but a helper? the -h or -help, basically a little documentation for a program
the first command line should be create and navigate directories