Check out a free preview of the full Developer Productivity course

The "Terminal & Multiplexing" Lesson is part of the full, Developer Productivity course featured in this preview video. Here's what you'd learn in this lesson:

ThePrimeagen discusses personal terminal choices, some background with the terminal, and the problem to be solved with terminal multiplexing.

Preview
Close

Transcript from the "Terminal & Multiplexing" Lesson

[00:00:00]
>> Now the terminal, this is my jam, okay? This is where I feel I've spent more time in. Obviously not enough time, but definitely more of my time is spent here. Vim is where I've spent all my time, right? Then I spent more time playing around with terminal stuff and then less for everything else.

[00:00:17]
And so this is, I find this to be super sad. No, where we're not talking about Vim today, I get it, okay? I know I want to, I wanna tell you about our lord and savior Vim, but I'm not gonna do that today, okay? And so just to be upfront, I use xterm and tmux.

[00:00:31]
Xterm is really old, it's just your basic terminal emulator that comes on a lot of systems, easy to use. There's also GNOME Terminal, I just use the old stuff. I don't want any of the new fancy stuff. I don't need it, they tend to be slower at rendering.

[00:00:47]
I just want simple, right? I just want simple, straightforward, and of course, tmux. And tmux is really incredible, not just because it's incredible by itself. But it also works on, you can use it on your Windows, you can use it on Mac OS X, and you can use it on Linux.

[00:01:03]
And the best part is, is that once you have an RC setup and the way you like to use it, you get to use tmux on all three of those systems the same way. For me that is just a huge selling point, right? I just want a similar uniform experience.

[00:01:16]
I know at some point in my future I'm gonna have to use a Mac and it's gonna happen and I'm gonna shed my Mac tears. And then I'm gonna have to set up my system and I'll just use tmux, and I'll be a happy camper anyway, so it'll be fine.

[00:01:29]
And really the problem we're trying to solve is this one. Now, this one, I swear I already feel my cortisol going up. I used to be this, I kid you not, I was definitely 100% this person at one point in my lifetime. So many terminals, so many things, it was just stressing me out all the time.

[00:01:47]
So we're gonna get started. This is where really the fun starts. Now, if I'm not, let's see, yeah, a little story about me. I did wanna put this in here. When I was younger, you remember that job I told you about where they said what about grep? I had to use a lot of terminals.

[00:02:03]
The first time I ever had to use a terminal ever in a professional environment, we used GAE, Google App Engine back then, we also had AWS, right? And then there's a lot of stuff you had to set up inside the terminal. And I'd have iTerm2 and I'd have 15 tabs, and every time I need to find something, [SOUND] it was always so painful.

[00:02:23]
And then I had an intern, I was a tech lead for one of these things, and I had an intern and I remember he was just like yeah, I just use bash for these things. And I remember thinking bash is such a stupid language, it's just so annoying to write, it's impossible to read.

[00:02:37]
It really is impossible to read, though. And I just like, why would you ever use it? And he's just like, yeah, cuz it just works on every computer in the world, it's fantastic. And I remember going, yeah, I mean, this guy has a point here. And so, that kind of helped lead me further down this road, that one simple interaction like hey, you know what?

[00:02:55]
Maybe I have opinions about things I really don't understand. Maybe I should take a little bit more time. And my love of the terminal and of the shell and all those things of that lifestyle grew from that point, which is really funny, I don't even think he knows it.

[00:03:09]
I'm not gonna be recommending any of the new terminal emulators, like I said, xterm, it was developed in 1984, okay? It's older than me, which is fantastic. But we all know the moment you mention a terminal emulator, what happens? This guy comes in, he needs to tell you about Alacritty.

[00:03:25]
Alacritty, the greatest terminal ever. It's written in Rust, so you already know it's fantastic, right? If anything's written in Rust, it's already better than the previous version. But here's the thing, the moment you mention Alacritty, too bad, Alacritty guy, there's actually the Kitty guy that comes out and goes no, Kitty, Kitty is the greatest terminal ever.

[00:03:42]
I have never had a conversation ever on the Internet that does not devolve into Kitty versus Alacritty when terminals are brought up. So that's why I've stayed out of it, I'm on something from generations ago, it's fantastic. So we're really gonna focus really in to multiplexing your terminal experience to solve that problem that we've showed you earlier.

[00:04:05]
But really to, what I call that harpoon navigation style, to really be able to get to where you want to be as fast as you possibly can. You stop having all this navigation woes, all the different terminals open, or the control tab going through each one of the different tabs.

[00:04:21]
You don't wanna live that, you don't want that, I don't want that for you, you don't want that for you, let's fix that, all right? And so we can kinda get started now, really into the technical part of the next section.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now