To obtain the exact behavior in the question, do one of the following.
Using a GUI Application
- Install
dconf-editor
- Open
dconf-editor
Find: org/gnome/desktop/wm/keybindings

Remove default behavior: Alt+Tab
Instructions
Find: switch-applications
Change: Use default value = false
Change: ['<Super>Tab', '<Alt>Tab']
to ['<Super>Tab']

Remove default behavior: Shift+Alt+Tab
Instructions
Find: switch-applications-backward
Change: Use default value = false
Change: ['<Shift><Super>Tab', '<Shift><Alt>Tab']
to ['<Shift><Super>Tab']

Set new behavior: Alt+Tab
Instructions
Find: switch-windows
Use default value = false
''
to ['<Alt>Tab']

Set new behavior: Shift+Alt+Tab
Instructions
Find: switch-windows-backward
Use default value = false
''
to ['<Shift><Alt>Tab']

If you want switch-windows
to work across workspaces
, not just in the current workspace
, you can also uncheck org/gnome/shell/window-switcher/current-workspace-only
- Close dconf-editor
- Older versions Gnome: (unnecessary in Ubuntu 18.04), You may also need to restart Gnome shell. To do this, first save any work and close all applications. Finally, press Alt+F2, then type r to restart Gnome.
Using shell
First, list existing settings, in case you want to revert. This does nothing other than list values.
gsettings get org.gnome.desktop.wm.keybindings switch-applications
gsettings get org.gnome.desktop.wm.keybindings switch-applications-backward
gsettings get org.gnome.desktop.wm.keybindings switch-windows
gsettings get org.gnome.desktop.wm.keybindings switch-windows-backward
Change to new behavior
gsettings set org.gnome.desktop.wm.keybindings switch-applications "['<Super>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "['<Shift><Super>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Alt>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward "['<Shift><Alt>Tab']"
Alt
+²
– wjandrea Aug 16 '18 at 18:31