Command Line Tools ALL Developers Should Know

preview_player
Показать описание
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.

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


📓 Learning Resources:

👨‍💻 My Coding Gear:
Рекомендации по теме
Комментарии
Автор

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.)

Chalisque
Автор

You are the best, the perfect mix of helpful and entertaining. Congrats on 400k

JM-tjqm
Автор

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

kshitijpatil
Автор

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.

nikfp
Автор

That Steve Ballmer clip is always great.

tonyf
Автор

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

cdey
Автор

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

graybri
Автор

readline in vi mode .. can't live without it

zympf
Автор

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.

yash
Автор

"The Chosen Ones" - music to my ears.

troyroa
Автор

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.

ambuj.k
Автор

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.

kdakan
Автор

Mcfly. A backwards search command tool. I have been using it for a couple of weeks now and it really increases my productivity.

filiperibeiro
Автор

halfway throught the video and Ive leared about 'ls' and 'package-managers'
nice work dog. this will git you far

chillydoog
Автор

grep, Vim, and tmux changed my life in the command line. Cannot recommend those tools enough.

lucidity
Автор

helix, broot, exa are my vital tools.

elliotts
Автор

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!

duscraftphoto
Автор

The one that writes your programs for you. That is the ultimate tool.

wheezybackports
Автор

Never getting tired of the not able to exit vim jokes! :)

jst
Автор

I'll save this for when i screw up my pc again :-)

Yuanti