I want to create a shortcut to run a command with keyboard shortcut But when I press "alt+ctrl+a" terminal open and immediately close.

Please help me to edit below command for prevent from close after ran it.

gnome-terminal -e "vnstat -ru -i wlan0 -h"


Try it with this command instead:

gnome-terminal -e "bash -c 'vnstat -ru -i wlan0 -h; exec bash'"

The exec bash part at the end causes to start a bash that replaces the current shell (also a bash).


create a keyboard shortcut with the following command : gnome-terminal . Thats it.

  • Also wants run a command – αғsнιη Oct 21 '14 at 8:55
  • What do you mean? This command "gnome-terminal" opens your terminal. – Julien Chau Oct 21 '14 at 9:03
  • 1
    Read the OP's question. He wants open a terminal and run his command altogether not just open terminal alone. – αғsнιη Oct 21 '14 at 9:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.