---
title: "tmux has-session"
description: "https://youtu.be/XucVVgGmesM"
date: 2021-08-09
published: true
template: blog-post
---


[https://youtu.be/XucVVgGmesM](https://youtu.be/XucVVgGmesM){.youtube-embed}

I see you there, trying to script out your tmux layouts. Tryig to get each
project setup just perfect with a script, but you keep stumbling over yourself
with `duplicate session` error messages

The `has-session` tmux command is a handy tool to prevent this `duplicate
session` error message when scripting your tmux layouts.

## command line

The command is pretty straight forward, you simply ask tmux if the session name
you are looking for exists.

``` bash
tmux has-session -t "waylonwalker_com"
```

<a href="/tmux-nav-2021/" class="wikilink" data-title="How I navigate tmux in 2021" data-description="change_speed = (speed) =&gt; [...document.querySelectorAll(&#39;video&#39;)].map(v =&gt; v.playbackRate=v.playbackRate+speed)" data-date="2021-05-11">How I navigate tmux in 2021</a>

> for more information on how I navigate tmux, check out this full post

Also check out the full YouTube
[tmux-playlist](https://www.youtube.com/playlist?list=PLTRNG6WIHETB4reAxbWza3CZeP9KL6Bkr)
to see all of the videos in this series.
