2

I want to run two commands on terminal on my virtual machine at the same time. I have this as of now:

sudo ptpd -c -g -b eth1 -h -D; sudo tcpdump -nni eth1 -e icmp[icmptype] == 8 -w capmasv6.pcap

However, the tcpdump command only starts running when I press CtrlC, and I don't want to cancel the first command.

If I just open two different terminals and write the command in each, is that fine or will it not work as I want it to?

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175

1 Answers1

5

Running each command in a different terminal will work; you can also start them in a single terminal with & at the end of the first to put it in the background (see Run script and not lose access to prompt / terminal):

sudo ptpd -c -g -b eth1 -h -D &
sudo tcpdump -nni eth1 -e icmp[icmptype] == 8 -w capmasv6.pcap
Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164