Command Line Tools ALL Developers Should Know

Command Line Tools ALL Developers Should Know

ForrestKnight

1 год назад

105,039 Просмотров

Get $20 off EACH of your first two orders of Cometeer (total of $40 OFF) when you use my code FORRESTK at https://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: https://github.com/forrestknight
🐦 Twitter: https://www.twitter.com/forrestpknight
💼 LinkedIn: https://www.linkedin.com/in/forrestpknight
📸 Instagram: https://www.instagram.com/forrestpknight

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

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

Тэги:

#command_line #command_line_interface #cli #command_line_tools #shell #terminal #gnu #linux #bash #multiplexer #neovim #vim #vi #zsh #homebrew #text_editor #console #konsole #alacritty #fuzzy_finder #emacs #package_manager #dpkg #apt #pacman
Ссылки и html тэги не поддерживаются


Комментарии:

Pranay Prasoon
Pranay Prasoon - 17.09.2023 20:46

for a second, i though 'cometer' was some sort of cli text editor 😒

Ответить
hamobu
hamobu - 12.09.2023 02:36

CLI is bad. You have to use recall memory instead of visual memory. You get no cues. Everybody is lying that they know CLI but they know few commands they use daily and the rest they google.

Ответить
Nika Chkhobadze
Nika Chkhobadze - 27.07.2023 19:23

To people who can relate, use this comment as an appreciation to the particular phrase from this video, namely: They can't figure out how to exit (VIM)

Ответить
Brian Gray
Brian Gray - 23.07.2023 07:22

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

Ответить
Trevor's Carnival
Trevor's Carnival - 11.07.2023 02:11

netstat

Ответить
Kevin Vélez
Kevin Vélez - 01.07.2023 02:33

Great video, I enjoyed it a lot.

Ответить
BogdanS
BogdanS - 26.06.2023 15:53

So what is Command Line Developer tools on mac?

Ответить
Coding with Culp
Coding with Culp - 19.06.2023 03:55

I highly recommend the book by Neal
Stephenson - "In the beginning was the command line."

Ответить
Naty Wubet
Naty Wubet - 25.04.2023 19:45

Why is no one mentioned nala?

Ответить
kdakan
kdakan - 10.04.2023 23:09

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.

Ответить
ItsToxicQT
ItsToxicQT - 04.04.2023 10:46

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)

Ответить
James Murphy
James Murphy - 20.03.2023 13:54

nala is a prettier, faster alternative to apt manage your packages, I've set up aliases to do sudo updates and upgrades etc.

Ответить
Alex A'Neals
Alex A'Neals - 15.03.2023 20:52

isql is one I have used especially when I have corrupted my local database and need to access it. git bash command line is also a tool I have used frequently.

Ответить
Levi Nevara
Levi Nevara - 15.03.2023 12:32

its not really a command but a helper? the -h or -help, basically a little documentation for a program

Ответить
sam williams
sam williams - 13.03.2023 16:36

update your system Forrest 🙂

Ответить
John Allsup
John Allsup - 08.03.2023 02:48

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

Ответить
kotlin Wombat
kotlin Wombat - 05.03.2023 04:20

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

Ответить
copiuumx
copiuumx - 04.03.2023 17:34

i use command line/terminal to utilize afking or automation in minecraft, thanks to minecraft console client

Ответить
SaLeH JaMaLi
SaLeH JaMaLi - 01.03.2023 22:07

Gimme my award

Ответить
aporia
aporia - 01.03.2023 04:24

helix, broot, exa are my vital tools.

Ответить
edward mac nab
edward mac nab - 28.02.2023 15:19

you forgot dash shell . As for text editors , couldn't you just use echo > file.txt or would that be echo | file.txt ? I know , I'm a blatant nube . Er--I mean Noob .

Ответить
Kshitij Patil
Kshitij Patil - 18.12.2022 23:20

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

Ответить
RobertB
RobertB - 08.12.2022 12:04

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

Ответить
Percit
Percit - 27.11.2022 11:09

i recommend tig, also zsh, oh my zsh and autosuggestions feature

Ответить
Tor Djärv
Tor Djärv - 25.11.2022 14:34

The best shell command I recommend is git

Ответить
jimigrunge
jimigrunge - 21.11.2022 02:21

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

Ответить
Ambuj Singh
Ambuj Singh - 16.11.2022 18:06

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.

Ответить
Benny Daon
Benny Daon - 16.11.2022 13:01

Great video 🎉 There are many great tools re-incarnations out there like ripgrep, lsd, bat. The one that takes my terminal to the next level is git[hub|lab] CLI. For the first time, I can mange my project in the shell using a clean and sharp interface.

Ответить
Sayan Dasgupta
Sayan Dasgupta - 13.11.2022 20:09

nano. 1st install nano then talk

Ответить
CHARLESTOPHER
CHARLESTOPHER - 10.11.2022 08:52

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.

Ответить
Akash Chandra
Akash Chandra - 09.11.2022 04:25

How do you have so much time to do all these things

Ответить
CallousCoder
CallousCoder - 08.11.2022 10:26

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.

Ответить
CallousCoder
CallousCoder - 08.11.2022 10:21

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.

Ответить
UXoverload
UXoverload - 07.11.2022 22:15

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!

Ответить
Bridge Boo
Bridge Boo - 07.11.2022 20:02

vim exit jokes crack me up so hard because i once had to google how to exit vim hehehehe

Ответить
Luke Avedon
Luke Avedon - 07.11.2022 19:48

I am in Windows Terminal with PowerShell. My favorites are posh-git and ag 'The Silver Searcher'

Ответить
hulio
hulio - 07.11.2022 18:21

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.

Ответить
Chiranjeevi Naidu
Chiranjeevi Naidu - 07.11.2022 10:13

I use Oh-My-Zsh, tmux and plugins in OMZ such as autocorrect and suggestions this makes life seriously easy

Ответить
MrBroggle
MrBroggle - 07.11.2022 10:04

fish shell on cool-term-emulator lmao

Ответить
Emille Henry
Emille Henry - 07.11.2022 08:32

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.

Ответить
Sean Callahan
Sean Callahan - 07.11.2022 04:32

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.

Ответить
Chili Dog
Chili Dog - 07.11.2022 03:02

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

Ответить
HectorGrey
HectorGrey - 06.11.2022 23:22

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.

Ответить
Hyeokjin Doo
Hyeokjin Doo - 06.11.2022 23:07

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

Ответить
Arnold Diaz
Arnold Diaz - 06.11.2022 21:00

how to exit vim?

Ответить