Switch Linux Workspace through CLI

Shawon Saha - May 2 '22 - - Dev Community

I'm working on a script that will set up my development environment in a single click. To separate numerous windows, I usually use workspaces.

So, for a lazy person like myself, going between workspaces and opening windows is a hassle.

wmctrl -s N
Enter fullscreen mode Exit fullscreen mode

Here N is the number of workspace counting from zero 0

This command saves a lot of time to initate my dev enviornment.

You can also use xdotool set_desktop N command as well.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .