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.

imagen

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 .sh file then you’re good to go with a single command

Change between windows by: ctl+b+o

This post is imported from: https://thebrownbox.hashnode.dev/i-use-tmux-to-start-multiple-cmd-at-once