I use tmux to start multiple cmd at once

If you like me, you have to open multiple terminals to start number of services (in my case 5,6 services) You gonna need to go to each folder and run some command. So I look for some solution to make this easy and faster, I found tmux tmux new-session \; \ send-keys 'cd ~/Work/Sources/customer-root && npm run start' C-m \; \ split-window -h \; \ send-keys 'cd ~/Work/Sources/customer-common && npm run serve' C-m \; \ split-window -v \; \ send-keys 'cd ~/Work/Sources/customer-dashboard && npm run start' C-m \; \ split-window -h \; \ send-keys 'cd ~/Work/Sources/customer-main && npm run start' C-m \; \ split-window -v \; \ send-keys 'cd ~/Work/Sources/customer-auth && npm run start' C-m \; \ select-layout tiled \; \ send-keys 'cd ~/Work/Sources/customer-root && npm run start' C-m \; \ add this to and ....

August 14, 2025 · 1 min