hdparm is a command line tool to find the actual read/write speeds of hard disk. To find the read write speeds of a drive, simply exexute the following command in terminal:
sudo hdparm -tT /dev/sda
the -t flag is for read timings and -T is for write timings.
/dev/sda is the disk on which the read/write timing measurements are to be performed.
In case hdparm is not installed, you can install it via command (in debian based distros):
sudo apt-get install hdparm
To analyse disk usage using terminal, a very handy utility exists by the name of NCurses Disk Usage. To install it, type the following in Debian based distributions (Ubuntu, Linux Mint etc)
sudo apt-get install ncdu
The most common usage of ncdu is with the options -x and -q.
-q Quiet mode, doesn’t update the screen 10 times a second while scanning, reduces network bandwidth used
-x Don’t cross filesystem borders (don’t descend into a directory which is a mounted disk)
To use the program
ncdu -x -q
The command to install a deb file via terminal is :
$ sudo dpkg -i package.deb
In terminal type the following command :
If you receive an error about curl not being found or installed, install it by using the following command (on Debian based distros (Ubuntu, Linux Mint)):
sudo apt-get install curl
To start with, if you are reading this post then you most likely know what GRUB is. However in the unlikely event that you dont know what it is, let me lay it out for you..
GRUB is a bootloader package from the GNU project. Many (but not all) linux distributions use GRUB as the bootloader. It is a multiboot bootloader and can contain entries of both Windows and GNU/Linux operating systems. Incidentally GRUB is the default bootloader that comes with Ubuntu.
Now suppose something happens to your GRUB (the bootloader) and it breaks or it doesnt remain the bootloader that your system uses anymore. This post explains how to restore GRUB as the default bootloader.
Please note that this guide applies only to GRUB 2.. if you want to install legacy GRUB, this wont work for you..
Also it is assumed that you dont have a seperate boot partition.
Anyways lets get started..
Firstly we would be needing a liveCD of Ubuntu.
- After booting into the liveCD enviroment, open a terminal
- To install/repair/replace something as important as the bootloader, we first need to become the root user (known as admin to Windows users). To achieve this, type the following command in the terminal
The terminal shall then prompt you for the root password. Enter the root password.
- Now that we have attained root rights, we can get along with the actual installation of GRUB2. The following commands assume that your Ubuntu is installed on /dev/sda7 partition. Replace the number 7 with the partition number where your Ubuntu is installed.
- First mount the partition which has your Ubuntu installation (/dev/sda7 in my case). To do this type the follwing command in the terminal.
mount /dev/sda7 /mnt
- Next install the GRUB2 using the following command
grub-install —root-directory=/mnt/ /dev/sdX
Here X is your drive alphabet. Ususally if only one drive is connected, then it is connected as /dev/sda. Still be sure about the drive alphabet before running this command.
NOTE : There are two “-” before “root-directory” in last command. Somehow tumblr / wordpress is replacing it with a single “-“. Thanks to ‘dae’ for pointing it out.
- Close the terminal and reboot the system. You GRUB bootloader is restored now and you should be able to boot into Ubuntu. If there are any other operating systems other than Ubuntu, you will have to update grub (after rebooting into Ubuntu) so that it can see search and save the information about the other operating systems that are on your system. In order to accomplish this, open a terminal and type the following command in the terminal.
I hope the above instructions helped you restore your GRUB2 bootloader. In case of any doubts/queries feel free to leave a comment for the same..
In Debian based distros (Ubuntu, Linux Mint etc.), the tendency of the operating system to use swap memory is defined by the swappiness. You can view this value by executing the following command:
The value of swappiness can range from 0 (least tendency to use swap) to 100 (high tendency to use swap). The default value is 60. A higher value of swappiness is usually desirable for servers. However for home users, a lower value is often favourable, especially when there is more than 512MB of ram on the system.
To change the value of swappiness, edit the /etc/sysctl.conf file. To do so type the following in the terminal:
gksudo gedit /etc/sysctl.conf
Add at the bottom of that text file, the following lines (copy and paste):
# Reduce the swap tendency
vm.swappiness = 10
To resolve this error, install the ia32-libs-gtk package
To resolve the error, you need to install the package “python-wxversion” and its dependencies.
It is relatively easy using a high level packaging tool such as aptitude or apt-get (on Debian based distros like Ubuntu and Linux Mint) or using Synaptic Package Manager (a GUI front-end for high level package manager)
Open synaptic, search for python-wxversion and install it and its dependencies. The error should now be resolved.