I usually start my second terminal from tmux by a cumbersome steps

1) Start a terminal ( I used alacritty)
2) initiate a tmux session tmux new -s 'main'
3) start a second terminal alacritty

The I closed the first terminal and work on the second one.

The steps is clumsy, since the first terminal invoked only as an intermediate.

How could start the first terminal(alacritty) directly from tmux?

  • Please delete your first question before you ask it again. – danzel May 30 '19 at 22:46
  • okay, deleted it, ty @danzel – AbstProcDo May 30 '19 at 22:49

alacritty is a terminal emulator. It's the drawing on your GUI that lets you do thing as if you were on the console.

tmux is a terminal multiplexer like screen that lets you run multiple terminal sessions within a single terminal but that can remain active even if you end your terminal application or connection.

You can connect to tmux from within alacritty or any other terminal emulator or ssh, etc connection. You can even connect to the same session from multiple terminals.

  1. Start alacritty however you start it.

  2. Type tmux attach || tmux new to attach to an existing session or start a new one.

  3. Use tmux attach -t target-name || tmux new -s target-name to attach or create to a specific session.

Alternatively a script file:


tmux attach -t MyFavSession || tmux new -s MyFavSession

Create a shortcut or edit the Alacritty menu entry to...

alacritty -e $HOME/bin/tmuxed

...to start alacritty with the tmux attach/new command automatically.


Here's how I did it.

I went into my ~/.alacritty.yml file and set my default shell to run with the argument tmux:


  program: /bin/fish


    - --login

    - -c tmux

screenshot of my .alacritty.yml

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.