What is the command to minimize the gnome terminal?

How can I minimize the Terminal window using a command? For example: I use the clear command to clear the terminal output, which command can I have to use to minimize the terminal window?


Solution 1:

You could use this command:

xdotool windowminimize $(xdotool getactivewindow)

You can change xdotool getactivewindow with a specific window that you would like to minimize.

xdotool wouldn't be installed on Ubuntu by default.So run the below command to install xdotool package.

sudo apt-get install xdotool