the Linux - Ubunto logo depicted under water

How to Type in Urdu in Linux – Ubuntu

Christoph DusenberyTechnology, Urdu Language Leave a Comment

Overview

Note: This post was written using Linux - Ubuntu (22.04.2).

In my last published post (How to Type in Hindi in Linux - Ubuntu), I was surprised by how user-friendly this Linux OS is. Now, having spent more time with it to write this post, I've become even more impressed and am happy to report that the in-built options provide a relatively easy and powerful solution for typing in Urdu!

Logo of Linux - Ubuntu
Linux is available in various "distributions" and for this post I used Ubuntu. The following is a guide for how to type in Urdu when running Ubuntu (specifically version 22). If you're on a Windows machine, you can check my post How to Type in Urdu in Windows 11.

Typing in Roman Transliteration

Are you looking for a way to type Urdu in Roman transliteration? Check out my page on how to type Hindi-Urdu words in Roman.

#1 - Add Urdu in Settings

Linux - Add a keyboard
Linux - Add a keyboard - Click on "Other"
  1. Click on the Show Applications button and select the gear icon to open Settings.
  2. Select Keyboard (near the middle of the list on the left-hand side).
  3. Under Input Sources, click on the + symbol.
  4. Click on Other and then the system should generate a long list of languages and their various keyboards.
  5. Scroll down to find the Urdu keyboards (it's alphabetical). Highlight one of the six options, such as Urdu (phonetic) and then click Add.
  6. You should see that Urdu (phonetic) is added to your list of Input Sources.
Linux - Adding Urdu (phonetic) keyboard
Linux - Input Sources with Urdu (phonetic)

#2 - Switching Languages

After adding Urdu in Settings, you'll have a few different ways of switching between languages.

Using the System Tray

Look for the language button on the right side of your system tray (usually at the top right-hand corner of your screen). It should display the current input language, such as en for English and ur for Urdu. Click on it and select Urdu (phonetic) from the menu.

Linux - Language Menu in System Tray

Using a Keyboard Shortcut

You can also switch languages quickly using the keyboard shortcut Super Key + Space. This will allow you to quickly cycle through the installed keyboards.

If you want to change that shortcut, you can find it and modify by doing the following:

  1. Go to Settings.
  2. Select Keyboard.
  3. At the bottom, there's a section called Keyboard Shortcuts. In that section, click on View and Customize Shortcuts.
  4. From the list of Keyboard Shortcuts, select Typing.
  5. Click on Switch to next input source and then enter whatever keyboard shortcut you prefer. If you wish, you can also change the shortcut for Switch to previous input source, which is especially helpful if you have three or more keyboards installed.
Linux - Keyboard Shortcuts
Linux - Shortcuts - Switch to next input source

#3 - Urdu Keyboard Layouts

In the above instructions we added the keyboard Urdu (phonetic), but that's not the only option. In the build of Ubuntu I'm currently using (22.04.02), there are a total of six in-built Urdu keyboards:

  • Urdu (Pakistan)
  • Urdu (Pakistan, CRULP)
  • Urdu (Pakistan, NLA) (not phonetic)
  • Urdu (Windows) (not phonetic)
  • Urdu (alt. phonetic)
  • Urdu (phonetic)

Two of these options are not phonetic (marked above). The other four are phonetic and quite similar to the Urdu - QWERTY keyboard I use on Mac OS (which is my personal favorite). They use use the shift key and the "super key" (i.e. the Windows key in Windows or the "option" key on a Mac) to cover all of the Nastaliq characters.

I personally prefer the phonetic options because you can start typing relatively fast from the beginning whereas the non-phonetic options require you to learn the layout. The phonetic keyboards are very similar and only have minor differences (e.g. in how to type ہ choṭī he). Here's a list of some of the keys which might not be so intuitive when using the Urdu (phonetic) option:

  • Type for ہ (choṭī he).
  • Type i for ی (choṭī ye).
  • Type y for ے (baṛī ye).
  • Type shift+n for ں (nūn-gunna)
  • Type shift+y for ◌َ (zabar)
  • Type shift+i for ◌ِ (zer)
  • Type u for ء (hamza)
  • Type shift+u for ئ (connecting hamza)

Here are images of the keyboard layouts of all six options.

Urdu (phonetic)
Linux - Keyboard Layout of Urdu (phonetic)
Urdu (Pakistan)
Linux - Keyboard Layout of Urdu (Pakistan)
Urdu (Pakistan, CRULP)
Linux - Keyboard Layout of Urdu (Pakistan, CRULP)
Urdu (Pakistan, NLA)
Linux - Keyboard Layout of Urdu (Pakistan, NLA)
Urdu (Windows)
Linux - Keyboard Layout of Urdu (Windows))

#4 - Typing in Urdu

Once you’ve switched to one of the Urdu keyboards, you can start typing in Nastaliq. When you're first starting, you should refer to the Keyboard Layout image for whichever keyboard you're using. To access that image, do the following:

  1. Go back to Settings → Keyboard.
  2. Click on the drop-down menu next to the keyboard you're using.
  3. Select View Keyboard Layout.
  4. The image of the layout should appear.
Linux - View Keyboard Layout

Unlike the in-built keyboard viewers in Mac OS and Windows 11, this is just an image. In other words, you can't click on the different keys—you can only use it as a reference while you're learning the layout.

Try typing in Urdu using one of the built-in word processors (like Text Editor or LibreOffice Writer). As you can see in the image below, it can be helpful to have the keyboard layout image right above (or below) the word processor.

Linux - Typing in Urdu in LibreOffice
Remember that because the Urdu script is a relatively vertical script (unlike Naskh, which is more horizontal), you may need to make the line spacing in your document at least 1.5 or 2.0.
LibreOffice - Changing the line spacing

Since Urdu is also a right-to-left language so you'll need to change your document settings accordingly. To do so in LibreOffice Writer, do the following:

  • Click on Format.
  • Select Paragraph.
  • Go to the Alignment tab.
  • On the bottom, you'll see Text direction listed under the Properties section.
  • Using the drop-down menu, change it to Right-to-Left (RTL).
Typing in Urdu in LibreOffice
Paragraph Settings in LibreOffice

Urdu Fonts

Want to try Urdu fonts other than the system defaults? Head over to my Urdu Fonts page and explore a wide range of fonts available for free download.

Where Can You Type in Urdu?

You can type in Urdu anywhere within Linux - Ubuntu as long as the application supports Unicode text input. This includes:

Text Editors: Text Editor, LibreOffice Writer, etc.

Web Browsers: FireFox, etc.

Email Clients: Thunderbird Mail, etc.

Most modern applications support Unicode, so you should have no trouble typing in Urdu across various platforms and applications.

By following these steps, you’ll be able to type in Urdu on your Linux - Ubuntu computer.

Leave a Reply

Your email address will not be published. Required fields are marked *