Ubuntu generally supports mobile broadband USB dongles. So let's start with:
How it should work
The dongle gets detected
You get the following window that asks for the SIMs PIN. Enter your PIN, check Automatically unlock this device and click Unlock.
If you've made it this far, you know that your dongle is supported.
Create a new Mobile Broadband connection
Select New Mobile Brodband connection... from the network indicator.
This will bring up the mobile broadband setup wizard.
Alternatively you can click Edit Connections..., then click the Add button in the Network Connections menu and select Mobile Broadband as the Connection Type, which will then also bring up the wizard shown below.
Follow the instructions and choose settings according to your country and provider/carrier. Mine looks like this:
That's basically it, you should have a working Internet connection in a few seconds when you hit the Continue button.
Troubleshooting - The easy part
The SIM card is blocked
Put the SIM in another device like a phone and enter the PUK when asked for. If that somehow does not work, you will need to call your providers/carriers customer support hotline.
Installing the Windows driver on Windows
Rumor has it that this works for some devices and has to be performed only once when the device is completely new and hasn't been used before. This is only needed to change the mode of the dongle. (See explanation about
Troubleshooting - The difficult part
Remember, you don't have to go through very time consuming and probably frustrating troubleshooting. If your WiFi already works, buy a mobile Wi-Fi hotspot.
The dongle doesn't get detected
If you don't get the window shown in step 1, then it might be that the SIM card is blocked (see paragraph above), not properly inserted (e.g. upside down) or the dongle itself is not detected due to
The thing with USB modes on these devices is, to first present the dongle as a read only storage device with an (outdated) driver that you could install and then change the mode so that the device can be used as it was intended. However you almost never need to install these drivers. The situation in most cases is, that Linux already has a driver, but somehow cannot activate the mobile broadband modem part of the dongle.
The following links might be helpful for further troubleshooting:
Determining which device you are using
You should also find out which dongle you have (as you can see in the example it's not always quite obvious and the
lsusb output may also not be accurate), search for it online and provide maker and model name along with to Ubuntu version you are using when you ask a new question, thus helping everyone finding questions already asked and corresponding answers.
There are only a few manufacturers of these dongles, namely Huawei and ZTE, but a lot of carriers re-brand them. Here is how it looks on mine:
It's a Huawei K5320. (A very old device. This is not meant to be a recommendation.)