Ubuntu detects all the external media by its own automatically without any problem, however, it is not fairly possible to detect all the devices out there without any issues, some devices cannot be detected (which is very rare). Here is the instruction you can follow to setup a new connection for GPRS/3G/4G network configuration. To set up a new connection you can follow these steps.
1. on the upper right corner of the screen click on a triangular shape which is the indicator or internet connections on Ubuntu just like on Windows or Mac.
2. After clicking on it, go to “Edit Connections” and click on it.
3. You will be greeted with a new pop-up window.
4. Click on “Mobile Broadband” tab. Click on “Add” button.
6. Choose you country
7. choose your internet service provider. If it is not listed by default you can add manually. But most likely it will be there.
8. Click “Continue” and then “Apply.”
9. Go to the triangular icon we clicked at the beginning and select your connection from the drop down list. Ubuntu will connect to your ISP and viola you can now surf the internet without any problem.
10. If you want to get your internet connected automatically at the system startup, Go to “Edit Connections” (that we visited before), click on “Mobile Broadband” tab, select your connection from the list and click on “Edit” button. In the Next window you will see a checkbox at the top tick the “checkbox” where it says “Connect Automatically” and you will get connected to your internet connection automatically at the system start up.