In previous articles we installed Ubuntu, learned how to use Gnome shell on Ubuntu and customize it as per needs. In this article I would be dealing on some more points which makes it easier to understand the aspects of Ubuntu for those who are still deeply wrapped up in the world of Windows. Then we will learn how you can use keyboard shortcuts to improve the User Experience of using Ubuntu. In the end we will see how you can use built in ways to help yourself if you ever needed to learn more about Ubuntu and Terminal commands.
Table of Contents
Philosophy of Linux over Windows
There are a few structural changes one notices when they migrate to Linux based OS like Ubuntu as compared to Windows. Following is a list that explains some of them:
1. Disk System
In Windows each partition of the HDD is referred as Disk1, Disk2 etc. While in Ubuntu it is termed as sda1, sda2. Here sda stands for one physical hard disk. And sda1 stands for Storage Device “A” partition 1 on a single physical HDD.
2. File System Type:
Filesystem is a way for the OS to keep the data on the HDD and a way to access it. Windows user would be familiar with NTFS and FAT32 but on Ubuntu, EXT3 or EXT4 is used primarily while EXT2 and XFS are also common.
3. Drive Naming Convention:
In Windows people are too familiar with drives named on alphabet like C, D, E and F. It’s the C: drive which is the root drive and where OS is installed. Ubuntu is radically different where the naming convention is considered.
In Ubuntu, root is a single forward slash. That is, “/“. So suppose I create a directory (another term for “folders”) called home in the root folder. The path for that would be /home.
Due to this convention, the way removable drives are handled is also different in Linux. A CD you insert with label projectone in the CD drive will be “mounted” and can be accessed from say, /media/username/projectone.
Lastly, in Linux, file and folder names are case sensitive. So, /home/user is different from /home/User and /home/USER.
4. Absolute and Relative Paths
Absolute path name starts with / and always begins from root. Relative path names never begins from root. Following shortcuts can be used while navigating in terminal:
- . (present directory)
- .. (parent directory)
- ~ (your home directory).
So if you are in /home/vyom/folder then to goto /home/abhi/music we can use the following command:
1. Absolute path command:
2. Relative path command:
In relative path command, the first .. takes you to /home/vyom then the second .. takes you to /home now from here /abhi/music takes you to /home/abhi/music. Similarly you could have used the command: cd ~/music to reach to your music folder. If you are vyom this command would take you to /home/vyom/music and if you were abhi it would take you to /home/abhi/music. This video from edx shows example of these command.
Each user who is setup on Ubuntu will have it’s own directory in /home directory. A user Abhi could have /home/abhi and a user Atul could have it’s /home/atul. All personal settings and files are stored in their own individual home directories.
Just like in Windows, the user folder is C:\Users\User_Name and other user specific folders are allocated in the folders inside that, in Ubuntu everything related to the user like Desktop, Documents, Pictures and Music etc are stored in /home/user/. The file manager nautilus (named Files in Ubuntu) which you can access from Dash, will open the /home/username folder by default.
Ubuntu is suddenly not ‘that’ different now eh?
This is something which is very useful to manage files and is even used in nginx, a web server (which is beyond the scope of this article). Consider symlinks as a shortcut to a file. You can create one using following example:
ln -s file1 file4
Above command creates a symlink file4 which points to file1.
On a standard PC keyboard, Super Key is the key with Windows logo on it (I think you can paste a Ubuntu logo sticker on it to honor Linux, but that’s just personal preference). This key is called Super Key Ubuntu wide, not just in Gnome. So when I say press, “Super + S” that would mean to press “Windows key + S“.
Migrating to Ubuntu can be tough for the touch typists and keyboard shortcut freaks, and is probably the thing which can be learned only with practice. With that in mind, let’s see how we can control the OS and applications with keyboard shortcuts.
Using Keyboard to…
In Windows, you press Win + D to minimize all apps and reach to Desktop, then Alt + Tab to switch between windows. You press Windows key and start typing the application name to search for the application you want to open and then press enter to open it. Let’s see how we do that in Ubuntu:
1. Minimize/Maximize all windows (like Win + D in Windows): Ctrl + Super + D
2. Switch Windows: Alt + Tab or Super + Tab
3. Press Super Key and start typing the name of app to search and press enter to open (same as in windows)
1. Activate Window Menu: Alt + Space (same as in Windows, and also where you can see below shortcuts)
2. Maximize window: Ctrl + Super + Up
3. Restore window: Ctrl + Super + Down
4. Move window: Alt + F7 (then use arrow keys)
5. Resize window: Alt + F8 (then use arrow keys)
1. Logging off: Ctrl + Alt + Del
2. Locking screen: Ctrl + Alt + L
3. Shutdown: Ctrl + Alt + T (will open Terminal). Type command: sudo poweroff
This is where a custom shortcut can make life easier. To create a shortcut to shutdown, open from Dash, System Settings -> Keyboard -> Shortcuts -> Custom Shortcuts. Here type “Shutdown” in name section and type following command in command section:
Now you need to assign a shortcut. Click the newly created shortcut and when it says “New accelerator…” type a shortcut which you want to assign. I prefer Shift + Ctrl + Alt + S, which is not assigned by default to any other action.
The “Shortcuts” section is also where you can see all the shortcut that is assigned to all the actions within Ubuntu. There are shortcuts to things you can’t even do in Windows through GUI, like Toggle Shaded State (Ctrl + Alt + S) which rolls the window to only in its title bar. You can even assign new shortcut by clicking the existing shortcut.
To View hidden files: CTRL + H
By default files starting with a dot (period) are hidden in Linux. But you can press Ctrl + H to temporarily view the hidden files. Which is a very handy shortcut since you don’t need to go to settings each time you want to view hidden files and want to toggle it back again.
Run any program shortcut: ALT + F2
This is the equivalent to Win + R run box in windows. Just press Alt + F2, enter the name of any application and the program will open it for you. For instance, entering firefox in the dialog box which opens after you press this shortcut will open Firefox browser. Enter a path to a folder say, “/home/folder” and it will open the path in the file explorer. Enter xkill command in it, which would bring a cross cursor to your disposal, that you can use to kill any application instantly by clicking on it. For more such commands, refer this page.
Edit Address bar: No shortcut!
In Windows you can edit the address bar and type in the address (path) to a folder to navigate to it directly. In Ubuntu (or Gnome) you can press “/” and then proceed typing the path if file explorer (Files) is open and you will be typing on the address bar which will suddenly be visible to edit for you. No shortcut needed at all.
As a newbie you will need help whenever you want to try something new, or to see what a particular command does, or sometimes just to refer the syntax of a particular command in Terminal. You don’t need to use Google everytime you get stuck in such situation. Following are the ways to get help in Ubuntu without Internet:
Short for “Manual”, man command can be used to view how to use a particular command. Just type Man followed by a command and a manual will open to brief you about what does that particular command does and how to use it. Example: Man ls will show you all the ways you can use the command ls to view list of files in a directory.
info like man command can be used to see details about any particular command and is usually a lot more detailed than the man command. If info is not available about particular command, it will instead open the manual by default. For important distinction between man and info command refer this.
help command can be used to get a comprehensive list of all the command you can use on the Terminal screen. Using help along with the command name will give a shorter description of the command than what man gives.
The command gnome-help will open the help documentation but in GUI mode, where you can click any of the topics to study it further. It’s recommended to go through it once for anyone migrating to Ubuntu.
GNOME Cheat Sheet:
There is a comprehensive guide available on the Internet which list all the shortcuts available on Gnome shell of Ubuntu. Refer the Cheat Sheet whenever you need help. And to get more comprehensive help on any aspect of Ubuntu just go to the Online help section.
In this article I dealt with how you can use keyboard shortcuts in Ubuntu to your advantage and to quickly get the work done. Once you get hang of the keyboard shortcuts, navigating in Ubuntu becomes as familiar as Windows. And once you learn the hidden shortcuts you will realize the just how powerful Ubuntu can be.