Thursday, 22 December 2016

Using Virtual box to try and run Linux



Virtual box is great tool provided by Oracle to run a guest OS let it be Windows, Mac or Linux. It gives users the freedom to have another
virtual machine without having to change the existing setup of their system but there are some drawbacks.

The Following packages are required
VirtualBox 5.x.x platform packages
VirtualBox 5.x.x Oracle VM VirtualBox Extension Pack (which has support for usb 2.0 and 3.0 etc..)

Host System (where virtual box is installed) must be having good configurations [My idea of a good configuration
minimum 4GB of RAM, 500 GB drive space, at least a dual core (2 cores) system but preference is quad core system (4 cores)]
This is due to the fact that virtual box is installing an entire system on the resources you have allocated like 2 GB of RAM, 70 GB storage space
and 1 processing core.

Friday, 9 December 2016

Some basic myths about Linux

Some basic myths that need to be demystified:
  1. Linux is tough to use: If Windows or Mac OS was the primary OS used for a very long time then it will slightly challenging in the beginning. Once accustomed, it does not take much effort. Linux has various desktop environments (styles of how you computer will appear) to choose from so you have a wider choice as compared to Windows and Mac. If you require a desktop environment similar to windows then try Linux Mint or any other OS which uses Cinnamon / KDE  desktop. Find out more here. Similarly for Mac you can use elementary OS which uses pantheon desktop (currently no other desktop that I know of has this environment) To have a quick glance to how desktop environments appear have a look at Fedora Spins
  2. Linux is used by coders and scientists a lot but I don't do those things that much:  Linux was intended as an alternative to Windows and Mac so it is possible to simply use it for media, web browsing, office (Not Microsoft's office suite), etc.. Only difference is that you don't have to shell out any extra cash while purchasing the hardware. Many Developers and researchers have chosen to use Linux as it is easy and efficient to setup software and automate certain tasks. Linux gives more flexibility on the file system as compared to Mac and Windows.
  3. Linux users use terminal so much and I don't know and don't want to use these commands: Unless there is an error while installing Linux in your system or you are trying to install software from source,  you don't need to know or use the terminal so often. Even if such an issue occurs there are many communities which provide help and direct commands can help solve the problem.
  4. Linux is virus proof: Linux is an OS just like Windows or Mac so it is theoretically susceptible to viruses but there are few aspects to this:   
    • Each distro is slightly different from the first so a virus made by hackers has to be rewritten multiple times for different systems. This becomes tedious as there are too many distributions each with their set of rules etc.. Also the vast majority of people use Windows or Mac thus the population of Linux users using a particular distribution is very less. 
    • Also Linux has a feature called file permissions which limits the access to the system thus protecting your self from viruses.
    • Also most Linux distributions have a software package manager which download the essential software form trusted sources 
    • There are antivirus programs available for Linux as well should the need arise.
  5. I already have a MacBook / Windows System and I hear that I must delete my entire laptop to use it: Installing a Linux distro (especially if it is the first time) can be a difficult task but it is not necessary to delete the current OS. There are 3 methods available to use Linux
    •  Dual boot: Have 2 operating systems in your computer and use only 1 of them at a time. for beginners Ubuntu / Linux mint is a distro to dual boot with Windows / Mac as they have a lot of support and easy installers. For seasoned / veteran Linux users any other distribution like Arch, Cent OS, Debian, Fedora, Kali etc .. can be used
    • Use virtualization software like Virtual box, Vm player: this lets you run Linux in parallel to your current OS but here performance can be an issue as 2 operating systems are running simultaneously. So this operation is useful while running a light weight Linux or the computer has a high configuration (min 4 GB Ram, i5 quadcore system and at least 50 GB storage space)
    • Using Live CD/DVD: You don't have to install Linux to try it out. a new feature is present where you can simply put Linux in a flash and run it without ever having to install. This is a useful feature for reviewing a Linux distros but to actually work or install software on that Linux Live session it is not recommended

My Thoughts on Linux

The following is just my thoughts on Linux. I have already covered on which Linux distro is best for beginners but I would like to put more emphasis on why in this post.

Linux is a free and open source Operating System (OS) which can be considered as an alternative to Other operating systems like Windows 10 by Microsoft and OSX by Apple. This makes sense as not many  can afford the high quality products manufactured by these companies such as MacBook, Microsoft Surface Pro, Microsoft Surface Studio etc.. And for those who can afford it there is not much customization possible as both companies  impose restrictions on the users from utilizing the devices full potential to suite individual needs. Peoples requirements can be form basic office use and media consumption like browser, video/audio player, word documents excel sheets, presentation  to  high level of scientific computations and play computationally intense games. For all of these requirements Linux can be a possible solution for everyone. To know the origins of why Linux was started have a look at Revolution OS  and understand what was in the minds of Richard Stallman, Linus Torvalds, Eric Raymond and many others who have contributed to the idea which is a reality today.

As there are many different people with different opinions, there are different Linux based operating systems to suite different needs. Why are there so many distributions of Linux? "Because we can" would be the closest answer to this question as per the GPL license through which Linux is distributed. The basic gist is that anyone can take the source code (which is open source) modify and do with it as they please and redistribute it. Which is why there are many distros like Debian, Ubuntu, Linux Mint, Fedora, CentOS, openSuse, elementry OS, Arch Linux, Kali Linux, puppy Linux, etc.. to have a brief idea about these various distros have a look at Distrowatch

Thursday, 14 April 2016

How to make a Live USB of Windows/Linux

After choosing an OS(Windows/Linux) the next challenge is to install it on your system without affecting any other system files/data already present in your system. It is a problem for Windows as it does not provide making a bootable live CD/USB with the feature to run from the bootable device without having to install (Live). This feature is in Linux OS so you can try the system without making any changes to you computers HDD. 

This a small procedure I have used to install Linux in different machines.
  • Download the LiveISO file: Download the .iso file of the Linux system to be installed.
  • Create a live USB/CD: Many Softwares are used to make Live CD/USB. For windows use unetbootin(cross-platform), universal usb creator. Linux automatically has tools such as "startup disk creator", "usb image writter", etc.. Select the particular USB/CD to be used (The USB/CD storage size should be greater than the iso file size. Also it is recommended to use USB flash drives as they can be used as many times as needed and they can be rewritten easily.) 

Set Brightness permanently in Ubuntu

Sometimes the brightness controls in Ubuntu do not work properly. Sometimes Ubuntu reverts to its default maximum value every time it reboots. I have used xbacklight but no change was visible. There is a simple fix to the problem using the following steps

  • Locate the back light directory:  Simply type the command
     
    cd /sys/class/backlight/
     
    Next use ls command to list out all the graphics e.g. acpi_video0, radeon_bl0 etc..
  • Locate the brightness file: Enter  the directory, locate the "max_brightness" file and display its content using

    cat max_brightness

    This will display the maximum value max_val of brightness. The "brightness" file controls the screen brightness. Choose the value X you would like to set the brightness where X can be an integer between 0 to max_val. A small tip is to use a fraction of the max_val say 40% to help decide value of X.
    (You may have to do the same procedure on as many folders as there are in /sys/class/backlight/ i.e. in my case I had both acpi_video0 & radeon_bl0 so I had to do it twice for it to work)
  •  Set rc.local: Now that X is chosen simply edit "/etc/rc.local" file using the command
    sudo gedit /etc/rc.local

    This script is executed at the end of each multiuser runlevel. Before "exit 0" command type the following:

    echo X > /sys/class/backlight/<graphic_folder>/brightness
     
    (In my case, 
     echo 6 > /sys/class/backlight/acpi_video0/brightness 
     echo 51 > /sys/class/backlight/radeon_bl0/brightness 
     exit 0
    )
  • Reboot: Reboot your system and you will see that the settings would have taken effect

Thursday, 3 March 2016

Install all octave packages in one shot

FOSSEE is the FREE and OPEN SOURCE SOFTWARE FOR EDUCATION

It aims on providing software which can be used in academia field and industries for free.
This very useful as researchers, institutes and many small scale start-ups and industries need not worry on purchasing licenses of softwares they require as an opensource substitute of that software is present e.g. Matlab can be substituted by octave or scilab,
Photoshop can be substituted by GNU Image Manipulation Program, Illustrator can be substituted by Inkscape and so on.
Octave is a light and open source software useful for computation. It is easy as it uses almost the same programming structure as Matlab, the software which is most used in academia and industries. However when octave is downloaded and installed  it  give a command line interface and all the other packages e.g. signal processing, control, etc are not  downloaded by default. One way to overcome this in Ubuntu (based distros) is :

sudo apt-get install $( apt-cache search octave-forge | awk '{printf $1; printf " " }' ) qtoctave

The text Highlighted in bold is simply a script to list all octave packages and qtoctave is a front end Graphical User Interface (GUI) that can be used instead of the command line interface.

Friday, 29 January 2016

Which Linux Distro to choose as a begineer ?

As mentioned in the earlier post, Linux has become an integral part of our life so now one cannot simply escape without knowing/using Linux. We may see in various hacker movies, the operating system look as though there is only text (Users with a Linux  disto simply press ctrl+alt+f1 to know) and we need to know some sophisticated language and type with incredible speed etc.. THIS IS NOT THE CASE AT ALL. Everyone has a first time with Linux so it is not necessary to know commands for the terminal while using Linux.

Most of the Linux distros come with a desktop environment so that beginners do not face any issue when starting. Only on some rare occasions you may have to use the terminal to write commands e.g. installing libraries for a C/C++ program, building a new software from scratch, etc... There are many different Desktop Environments like and my preference order is as follows:
  • Cinnamon 
  • Mate
  • GNOME 
  • Unity (Mainly used by Ubuntu)
  • KDE
  • XFCE
  • LXDE
  • Standard i.e. (no desktop environment so only commands like Debian standard)

For a beginner, it would be nice to use a distribution which is easy to install as well as use. So the best way to start is to use "Ubuntu" (as it has support for UEFI ) or "Linux Mint" (Linux Mint 17 in case you are using an older system with BIOS and 17.3 "Rosa" support UEFI) or "Elementry OS"(which gives the feel of Mac OSX using Pantheon desktop)  "Fedora" (a bit tedious while installing) which is also UEFI compatible. If you are completely new to Linux, the standard Ubuntu with Unity Desktop will be most preferred.

Ubuntu or its derivatives are easy to install as they generally have the "install alongside" option. One Distro (say Ubuntu with default Unity Desktop) can come in different other desktop environments , as mentioned above, so simply have a look at the other distros (Kubuntu, Lubuntu, Ubuntu-Mate, Ubuntu Studio, etc.. ) from distrowatch.com and see which one appeals the most. So have a look at the distro's desktop
(search for screen shots of the distro you are interested in).

My personal preference is the cinnamon desktop which is not present in Ubuntu. Linux Mint is a derivative of Ubuntu so all the normal command work with a few changes e.g. bashrc file. Next i would choose Ubuntu Mate as it preserves the look of Ubuntu 10.04 if one needs to know how to use / locate applications in the environment. It is not as resource hungry as the later versions of Ubuntu (>13.04) with unity desktop. But then again you are welcome to explore all the distros.

Those who are well versed with Linux can try distributions like Debian which is a very stable and sturdy distro or Fedora which is a project of Redhat. or even Arch Linux, Slackware,