The reliability of Linux operating systems is much higher as compare to windows from many aspects whether it is about the security or system crash. That is the reason why most of the developers prefer Linux over any other OS. Ubuntu is a debian based operating system which is open source and can be easily downloaded from its official website. This operating system is not as famous as windows or Mac, as a result, the availability of applications is less. But using Linux based operating system means complete freedom of using apps. There are some terminal commands that you can use to launch your default apps with simple commands in Ubuntu.
Due to its open source nature, the user can customize the functionality according to their convenience. There is no need to search important program files through different software such as HTML opening with web browser. You just need to type some command lines and specific application will open automatically. This article will guide to launch your default apps with simple commands in Ubuntu very easily. Just follow the steps and be the master of Linux within few minutes.
How to Launch Your Default Apps With Simple Commands in Ubuntu:
The update-alternative system
The first thing to initiate the procedure of opening applications with terminal command is looking at alternative editor provides a terminal based text editor. This is the command line to be followed:-
whereis editor
editor: /usr/bin/editor /usr/share/man/man1/editor.1.gz
By entering:-
sudo editor /etc/fstab
the file system config file will open in text editor. It will open in nano as shown in below picture:-
You may consider editor command a symbolic link or a link to nano. Same as, the command usr/bin/editor is a link to etc/alternative/editor which is location where system alternatives are managed as symbolic links. This is actually your path link that links to an alternative directory to a program which is a tool to manage the links.
Example update-alternative usage
Generally the update alternatives follow the following pattern:-
sudo update-alternatives [option] [alternative(s)]
Here in this command line, the term alternatives refer to the program that will end up using by the programmer. The option word in command line refers what you want to do. With the help of display option, some details will appear while continuing with editor component.
update-alternatives –display editor
In this picture, the top most lines illustrate the path of editor command and also show what is linked currently. The list command will make things much clear which is:-
update-alternatives –list editor
Through this command line, you will find nano as alternative for editor. The third option is assigning the editor to call VIM program on the place of config option which can be opened with following command:-
sudo update-alternatives –config editor
Here you can select a new option by using interactive menu. In case you know which program you want to execute, choose the set option as:-
sudo update-alternatives –set editor /usr/bin/vim.basic
Update-alternative options
You can make use of update-alternatives systems through many options from which, some of the most useful are provided below. These options will be helpful to launch your default apps with simple commands in ubuntu. So the first one is:-
update-alternatives –config java
For the programs that require a defined version of java for installation on ubuntu based system, you can install open source java. It will enable the user to install multiple versions of oracle JRE.
Check the convenience app update-java-alternatives that will help you in java-specific work.
update-alternatives –config x-www-browser/gnome-www-browser
This command line will help the user to set the default web browser followed by this command:-
update-alternatives –config mozilla-flashplugin
This will be helpful in opting out between adobe version and gnash open source.
Till now, the partial availabilities are discussed, but if you are searching for a command line with full range capabilities then follow this:-
update-alternatives –get-selections
Customize your alternatives
In addition to the alternative features, some options are available to customize the alternative groups. While installing supported packages, alternatives are added automatically. But it is also possible that you can add your own alternative that needs to populate these alternatives manually. If you want to create x-word-processor alternative then use this command:-
sudo update-alternatives –install /usr/bin/word-processor x-word-processor /usr/bin/lowriter 40
This command line will create:-
- A new symlink called word processor representing
- Create x-word-processor as new alternative group
- Priority of 40
Executing word processor with command line will launch libr3e office writer. With the help of same command, you can change the real application bath through this command line:-
sudo update-alternatives –install /usr/bin/word-processor x-word-processor /usr/bin/wordgrinder 20
that will how the following options for user as illustrated in picture.
This is the detailed process to launch your default apps with simple commands in ubuntu. With the help of pictures and command lines provided in this article, every ubuntu user can gain access to their applications.