当前位置: 动力学知识库 > 问答 > 编程问答 >

shell - How to execute more than one command in terminal over SSH?

问题描述:

I'm currently connecting to a Raspberry Pi Model B running Raspbian via SSH.

I'm trying to program a script to run several commands continuously; I want these two commands to run along side each other:

arpspoof -i wlan0 -t 192.168.1.1 192.168.1.100

arpspoof -i wlan0 -t 192.168.1.100 192.168.1.1

Does putting one command after another in a Shell script allow them both to run together?

网友答案:

You can use nohup to run these commands together, i.e:

nohup arpspoof -i wlan0 -t 192.168.1.1 192.168.1.100 > /var/log/logfile1 &
nohup arpspoof -i wlan0 -t 192.168.1.100 192.168.1.1 > /var/log/logfile2 &
分享给朋友:
您可能感兴趣的文章:
随机阅读: