I am looking for a way to send an executed command to a TTY terminal. For example, let us say that I open the gnome-terminal and on the window I type sudo aptitude update && sudo aptitude upgrade
.
How can I send this to a TTY terminal instead of working with it in the TTY7 GUI environment?
Best Answer
I would recommend not doing that directly, but use a terminal multiplexer, such as tmux, as an in-between.
In the terminal that should receive the command start tmux with an identifier:
Send commands to it with: