Is there a way I can input these two commands into a new terminal at the same time?
( konsole -e sudo nethogs
sudo sysctl net.ipv4.ip_forward=1 )
Is there a way I can input these two commands into a new terminal at the same time?
( konsole -e sudo nethogs
sudo sysctl net.ipv4.ip_forward=1 )
I think what you want to do with konsole is the following:
$ konsole -e "sudo sysctl net.ipv4.ip_forward=1; sudo nethogs" --noclose --hold
This will invoke konsole and then run commands within it, -e. In this case we're running the 2 sudo commands and we're using the --noclose & --hold to tell konsole to keep the window open while these run.
konsole -e "sudo whoami; sudo whoami" --noclose --hold to see what the issue might be more easily.
– slm
Apr 08 '19 at 13:16
konsole -e "sudo whoami; sudo whoami;bash" -- The final bash will make the konsole window stay instead of close immediately after finishing the previous commands.
– sudodus
Apr 08 '19 at 13:33
gksudo instead of sudo? - https://unix.stackexchange.com/questions/382789/qstandardpaths-xdg-runtime-dir-not-set-defaulting-to-tmp-runtime-root-when
– slm
Apr 08 '19 at 14:13
To send several commands to different terminals simultaneously one easy way could be with byobu:
Press Ctrl+F2 to vertical split, then Shift+F9: