Changing default editor in Ubuntu

When I opened visudo file in Linux it opened in default editor i.e joe. So by running only one command I will change the default editor in Linux.

sudo update-alternatives --config editor

The output of the above command will show all the editors presents in your system and you will select only one editor as default.

Convert any video into audio on Ubuntu

There are two methods by which you should convert any video in audio on Ubuntu 14.04.

  1. Through command line
  2. By using GUI

Through command line:

First you should install avconv. Just type two command in a terminal for installation.

$ sudo apt-get update
$ sudo apt-get install libav-tools

Writing the given below command for converting video into audio.

$ avconv -i amrit.mp4 -f mp3 amrit.mp3

Some points about the above command:

  • Don’t forget to replace the input file name with your video file name.
  • -i amrit.mp4 is the file that we want to convert (-i = -input).
  • -f mp3 is the format we want our output file to use it, you can switch to “wav” or “webm” if you want.
  • amrit.mp3 is the name of the output file.

By using GUI:

  1. First step you should install winff. For installing winff open a terminal and type the following commands:
    $ sudo apt-get install winff libavcodec-extra
  2. Second step is to open winff. Write a single command to open winff.
    $ winff

    By writing a above command Winff window is open like this


  3. Then in Winff window, do these
    • Add file
    • Select what catagory to convert (select Audio)
    • Select Audio file format (mp3)
    • Type the output folder for converted file

    For example :


  4. Then click the Convert button.