How do I turn on workspaces? (Why do I only have one workspace?)

for 13.04 and later..

Workspaces are disabled by default in Ubuntu since 13.04. To enable them, open Appearance from the dash:

enter image description here

Switch to the behaviour tab and check "Enable Workspaces".

enter image description here

If you want to hide the workspace switcher see this question.


Using the Dash or a terminal, open the dconf-editor application. Navigate to

org.compiz.profiles.unity.plugins.core

And set the horizontal and vertical dimensions of your wall. A workspace switcher will immediately appear on the launcher. You can use this or Super-s to view the virtual desktops / workspaces.

Edit

To set this using command-line, execute the command:

gsettings set org.compiz.core:/org/compiz/profiles/unity/plugins/core/ hsize 2
gsettings set org.compiz.core:/org/compiz/profiles/unity/plugins/core/ vsize 2

This will immediately enable workspaces. This command will actually set hsize to 2 and vsize to 2, giving you 4 workspaces arranged in a square, which is the default when you enable workspaces from the GUI "Appearance" setting.


Ubuntu 13.04 Raring Ringtail will come with workspaces disabled by default, so before being able to switch between them go to "System Settings..." > "Appearance" and switch to "Behavior" tab, then it is just to check "Enable Workspaces" option and you will have back your 4 workspaces.

Ctrl+Alt+Arrow will change current workspace and Shift+Ctrl+Alt+Arrow will change the current focused window to the desired workspace.

You can see a list of all the shortcuts of Ubuntu from "System Settings..." > "Keyboard" then switch to "Keyboard Shortcuts" tab and then you will be able, beyond to see all of them, to change them and create new shortcuts.


This may be new since Alaa answered, but there is also a graphical way of adjusting the number of workspaces when you have compiz installed.

Open CompizConfig Settings Manager (installs from the Ubuntu Software Centre if not already installed), then under "General", click "General Options" and go to the "Desktop Size" tab. This will automatically enable workspaces and gives you the ability to adjust it as you like. I personally like 4 horizontal, 1 vertical. It's really cool with desktop cube enabled.


You can also install the Unity Tweak Tool, using it you can customize many aspects of the unity interface, including the number of workspaces. You can install it using the following repository:

sudo apt-get install unity-tweak-tool

Then you just open the Unity Tweak Tool, go to Window Manager/Workspace Settings and so you can choose as many workspaces as you wish. I like to use it because I can set workspaces to be not just on the horizontal but on the vertical as well.

enter image description here