It's a lot easier to manage your tmux session when they have sensible names. We'll cover: - How to create a new, named tmux session with tmux new -s - Rename an existing tmux session using tmux rename-session -t - Renaming sessions with C-b $ - Listing...
Duration
2 min
Access
Pro
Transcript
Available
It's a lot easier to manage your tmux session when they have sensible names. We'll cover:
How to create a new, named tmux session with tmux new -s
Rename an existing tmux session using tmux rename-session -t
Renaming sessions with C-b $
Listing sessions with C-b s
Video Transcript
Managing your Tmux sessions is a lot easier if they have sensible names. In order to rename a session while you're attached to it, we can do control b $. It will tell you here, "Go ahead. Rename your session."
I'm going to rename this to be To-do MVC. Now you can see in the status bar it tells me that I'm in the To-do MVC session. If I had to detach from this session with control b d, and then do tmux ls again. You can see that now the To-do MVC session is properly named.
That also means that now I can attach to it and call it with -t and then the session's current name. Now if I want, I can also view the list of sessions from within Tmux. I do that by doing control b and then s. You can see right here we now have this list. If I click zero, it will switch me into that session. Now, detach with control b d.
You can also rename sessions from the command line not from within a Tmux session. I'm going to rename my session by typing tmux rename session -d, and then the session name. I'm going to rename session two. I'm going to rename it to Scratch. Now if I run tmux ls, you can see that we have the Scratch session, as well as the To-do MVC session.
Lastly, we can create a new session with a name by typing tmux new -s, and then the session name. Now if we view the list of sessions with control b s, you can see we have all three of our newly named sessions available here.
Duration
2 min
Access
Pro
Transcript
Available
Course lesson
Manage terminal workspaces using session naming
It's a lot easier to manage your tmux session when they have sensible names. We'll cover: - How to create a new, named tmux session with tmux new -s - Rename an existing tmux session using tmux rename-session -t - Renaming sessions with C-b $ - Listing...
Access required
This lesson is available with an active egghead membership.