Friday, August 23, 2013
Sunday, March 17, 2013
How To: Create swap file in Ubuntu 11.04
1. Open Terminal by pressing alt+ctrl+t
2. Enter the command
cat /proc/meminfo
3. Now enter
sudo dd if = /dev/zero of=/swapfile bs=1024 count=XX
swapfile size = count * bs
e.g. count=2M OR count = 2048K
so size=1024 * 2M = 2GB
4. sudo chmod 600 /swapfile && sudo mkswap /swapfile
5. sudo swapoff -a
6. sudo swapon /swapfile
7. sudo -b gedit /etc/fstab
edit /etc/fstab file and remove or comment out all old swap partitions
8. Add new line:
/swapfile none swap sw 0 0
verify that everything is done OK
9. free -m
10. Now you'll see your swap reported
swapon -s
Friday, March 1, 2013
How To : Enable/Disbale hibernate and suspend option in Ubuntu 11.04
Ubuntu Version 11.04
Steps:
1: Open terminal by pressing Alt+Ctrl+t
2: Enter the command given below
sudo gedit /usr/share/polkit-1/actions/org.freedesktop.upower.policy
sudo command is used because the editing the file require root privilage and hence it requires password to enter.
3: At the end suspend and hibernate section you will find two lines(if both are enabled):
<allow_inactive>no</allow_inactive>
<allow_active>yes</allow_active>
<allow_active>yes</allow_active>
4: Change yes to no and vice-versa. we assume that in your system both are enabled and you want to disabled it. If it is not the file contain the below lines
<allow_inactive>yes</allow_inactive>
<allow_active>no</allow_active>
<allow_active>no</allow_active>
and now you have to turn "yes" to "no" and "no" to "yes" to make it enable.
Note : it's preferable to use "gksudo" instead of "sudo" when opening graphical programs, to prevent permission errors
Subscribe to:
Posts (Atom)