Via a bash command, I want open a terminal and, from the new terminal, execute a simple bash command.
I tried:
gnome-terminal -- "/bin/bash -c ls"
But I got this error:
I don't understand the error and I cannot find an example anywhere for help.
The quotes are telling the terminal to run an executable in /bin
called bash -c ls
(with the spaces as part of its name!). There exists no such executable.
Take them out:
gnome-terminal -- /bin/bash -c ls
...or, to actually make something stay open until the user provides input...
gnome-terminal -- /bin/bash -c 'ls; read'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With