# Bhyve - how to use tmux as the console?



## Deleted member 63539 (Aug 28, 2020)

Setting vm-bhyve to use tmux as the console is just a single line of config: https://github.com/churchers/vm-bhyve/wiki/Using-tmux

But I want to know how to do that with the plain bhyve command. Please let me know how to do this. Thanks.


----------



## usdmatt (Aug 28, 2020)

Well the most obvious way would be to just start a new tmux session then just run the bhyve command.

Vm-bhyve uses something similar to the command below to start a new session and run bhyve in it. You can add -d to start it detached so that it goes off and does its thing in the background and just leaves you at your original shell.

tmux new -s session-name bhyve bhyve-args...


----------



## Phishfry (Aug 28, 2020)

This is how I used `tmux` when using legacy.








						Bhyve started from tmux
					

I have been messing around with different ways to start VM's with Bhyve. My latest works good. I use the stdio console and sysutils/tmux. /etc/rc.local #!/bin/sh bhyveload -m 8G -S -d /vm/freebsd/freebsd1.img freebsd1 sleep 2 bhyveload -m 4G -S -d /vm/freebsd/freebsd2.img freebsd2 sleep 2...




					forums.freebsd.org


----------

