Most users of Linux on any device that has a keyboard knows the Alt+Tab shortcut. It’s a common one on many types of operating systems today, but it generally only moves applications in a single direction. Some programmers have to sort through their windows in the exact order they appear in their taskbar or icon manager, and thus they use python scripts and the wmctrl command line application to make absolute sure that they get this kind of behavior.
A vast majority of users won’t need this kind of exacting control, but there are a few ways that they can still get the same sorts of benefits without the need of authoring a script. These simple techniques will make it much easier to manage a wide variety of windows at the same time.
Method 1: With the Xfce4, KDE and GNOME Task Switchers
Just as in all other environments since Microsoft Windows 3.0, you can hold down Alt+Tab in most modern Linux and FreeBSD desktop environments. A key difference is the fact that like in modern Windows environments, you can actually use the mouse cursor to click on any of the icons that come up when you do this if you’re using something like Xfce4 or KDE. This allows you to switch to any of these programs instantly.
If you’re using a mouse with a scroll wheel, then you can also use this to spin the highlighted application in either direction. Release the wheel and the Alt and Tab keys when you’ve highlighted the desired application. This will switch to it automatically. The same should work on any device that has a trackpad with a simulated scroll wheel. Users of devices with touchscreens can also tab the application regardless of what’s been highlighted.
Note that LXDE uses something closer to what was historically found in Windows 95, thus this method isn’t useful for those with Lubuntu, LXLE or any of the other varieties of Linux that use Openbox as a window manager. You may, however, get it to work properly under the MATE and Cinnamon desktop environments without needing to make any changes to configuration files.
Method 2: Using the Shift Key
You can cycle through your listed tasks in most desktop environments including those that are Openbox-based by using the Alt+Tab shortcut while either holding Tab down or pushing it repeatedly. This standby only moves in a single direction, though. If you wanted to go backward, then you’ll need to add the Shift key to the mix.
Hold down Alt and Shift at the same time. When you push Tab, you’ll cycle through applications in the opposite order. You can hold down and let up on Shift to go in either direction. This trick is compatible with LXDE-based distributions, including Lubuntu and LXLE.
While you’ll be moving in the same direction that Alt+Tab would move you in, you can also hold Alt+Esc to cycle through windows without the need of a task switching box. Most environments support this shortcut, though it’s been largely ignored in the modern era. When windows are overlapped, this method will raise them to the front. This shortcut might be especially useful if you use a focus-follows-pointer policy instead of the click-to-focus policy that Windows and Macintosh users are used to.
Method 3: Switch Window for Same Application
If you have more than one window open for the same application, then you might have access to a keyboard shortcut that allows you to cycle through only these. For example, say you had three Firefox windows open and one of them was the active window. You might, depending on your desktop environment, be able to hold down the Super key and push the Tab key to switch between the three of them while ignoring other windows on your desktop. This will raise any of the windows currently hidden by another one.
Xfce4 users including those using Debian-Xfce and Xubuntu can change this keyboard shortcut to suit them. Click on the Whisker menu and head to System Tools then Window Manager settings. You can also search for it and then click on it in the search results on the Xfce4 bar.
Click on the Keyboard tab, then scroll down so you can double-click on the “Switch window for same application” option. You’ll be given the option to hold down whichever key combination you’d like to set this to. Once you have it the way you want it, click on the Close button to finalize your setting.
Method 4: Cycling Through Browser Tabs
It’s also possible to cycle through your browser tabs using a slightly different technique. Many users find this challenging since their taskbars and icon managers don’t actually provide any assistance in enumerating these tabs.
If you have multiple tabs open in a Web browser, then hold down the Ctrl key and push the Tab key to cycle through them. You can cycle in the opposite direction by holding down Ctrl and Shift while pushing Tab. This technique works in Firefox, Midori, Chrome and most other browsers that Linux users will come across. It should also work on other platforms as well. Users who have an Apple keyboard attached to a Linux machine may need to use the Command key instead of the Ctrl key. Depending on your keyboard, you might actually see a knot or some other emblem on the Command key instead of or in addition to the word Command. Some layouts could additionally require you to use the Option key. If you’re using Ubuntu or Debian on an Apple Macintosh with any sort of USB PC keyboard plugged in, however, you shouldn’t have any issues following the same layout you’ve used in any other Linux environment.
Keep in mind that Ctrl+W is an easy way to close out a tab in these environments without shutting down the browser. Try using Ctrl+Tab or Ctrl+Shift+Tab with releasing the Tab or Shift and Tab keys when you get to a tab that you no longer want open. Without lifting the Ctrl key you can push the W key to quickly close it out.
This cycling shortcut isn’t available in many terminal emulator and file browser applications, but you can still use the Tab key or Shift+Tab a few times to get a particular tabbed area highlighted and then use the cursor keys to navigate to it.