Tag Archives: Linux Tips

Ubuntu Linux: How to Enable or Disable Swap Partition

In this post we shall discuss how to enable or disable swap partition in Ubuntu Linux. Ubuntu Linux or any Linux operating system can use a swap partition for paging in case if it runs out of physical memory. The swap partition is not a mandatory requirement for using Linux but it is advisable that you have a swap partition setup to avoid memory bottleneck in case you run out of your physical memory.

The aim of this post is explorer the ways in which we can enable or disable swap partitions it is assumed that you have already swap partition created during the Ubuntu Linux installation.

Method 1:

We can use Gparted partition manager to enable or disable a swap partition. If Gparted is not installed in your Ubuntu Linux then use the following command below to install it.

   1: sudo apt-get install gparted

This will install the Gparted partition editor which you can access from System>>Administration>>Partition Editor

screenshot-1

The Gparted will now display all the available partitions in the hard disk that is selected. In this case we have a 14.99GB hard disk that has got a swap partition of 682.42MB.

screenshot-2

To enable the Swap partition:

To enable the swap partitions right click on the swap partition and then select the Swapon’ option to enable the swap partition.

screenshot-3

To disable the Swap partition:

To disable the swap partitions right click on the swap partition and then select the Swapoff’ option to disable the swap partition.

screenshot-4

Method 2:

In this method we shall discuss the enabling and disabling swap partition from terminal.

To enable the Swap partition:

To enable all the swap partitions on your computer you can use the following command.

   1: sudo swapon a

If you would like to enable the swap partition for a particular partition then you can use the following command:

   1: sudo swapon U <uuid>

To find the UUID of all the partitions use this command:

   1: sudo blkid

screenshot-5

In our example the UUID of our swap partition is 39be8652-da3d-4ad0-b11a-adb6c2ba3586 so the command will look like:

   1: sudo swapon U 39be8652-da3d-4ad0-b11a-adb6c2ba3586

To disable the Swap partition:

To disable all the swap partitions on your computer you can use the following command.

   1: sudo swapoff a

If you would like to disable the swap partition for a particular partition then you can use the following command:

   1: sudo swapoff U <uuid>

In our example the UUID of our swap partition is 39be8652-da3d-4ad0-b11a-adb6c2ba3586 so the command will look like:

   1: sudo swapoff U 39be8652-da3d-4ad0-b11a-adb6c2ba3586

That’s it you can enable or disable swap partition either using the Gparted GUI or using the command line.

[This is a guest post by Shivaranjan Bhoopathy. He writes articles on Linux, Windows and freeware softwares. A visit to his Blog is highly recommended. You’re sure to find something of interest.]

Practical Linux Find Command Examples

Linux commands are not that easy, however there are websites which come up with brilliant tutorials that make learning Linux that more easier, just like our have been useful in the past, the Geek Stuff has been coming up with useful that would help make you a better Linux user.

This time around the Geek Stuff has come up with 15 Practical Linux Find Command examples, and mind you the find command can be pretty useful, when you need to search files, locate text in files or more.

Continue reading Practical Linux Find Command Examples

How To Recall Typed Commands In Linux?

For me Linux has always been a Command Line Interface (CLI) as opposed to a Graphical User Interface (GUI), learning commands the hard way is the best way to remember them, but why type over commands that you have already typed in a current or previous session in the console?

Here is a simple tip that will help you iterate through several commands you have typed in earlier on a *nix based console.

Continue reading How To Recall Typed Commands In Linux?

How To Backup and Email Your Blog MySQL Database From Command Prompt?

are the way of keeping your data safe and secure from disasters, and those include your personal data as well your blog database where you have been writing for days, months or years.

We have always opted for hosting providers that provide us access to Shell interfaces using which we can use putty to manage our website, this not only puts us in a better and more comfortable interface but also allows us to use CLI (command line interface) which we are pretty much comfortable with.

Continue reading How To Backup and Email Your Blog MySQL Database From Command Prompt?

Download BOSS, The Indian Flavor of Linux

Just got a tweet about BOSS (Bharat Operating System Solutions) which is a Indian flavor of Linux developed by C-DAC (Centre for Development of Advanced Computing) for enhancing the use of Free/ Open Source Software throughout India.

This Indian GNU/Linux distribution is currently localized for Indian languages such as Hindi and Tamil.

The main aim of BOSS is to get more and more people and government organizations to use Open Source Software (OSS), we are sure that the localization of language should draw many users.

Kudos to the C-DAC team for coming up with BOSS. You can learn more and download BOSS here.

How to Go Back To Previous Directory and Home Directory in Linux Shell or Putty?

We have been using Putty to access Linux servers for quite some time, and we have shared several Linux Tips in the past, here is another tip that should be useful for many users.

If you used cd to change the directory in Linux you can easily go back to the previous directory by using a command. For example you were in /usr/keith/my/inner/directory/which/is/so/deep and you use the command cd /var/www you can go back to the previous directory without having to type in the entire directory path by using the command cd .

Continue reading How to Go Back To Previous Directory and Home Directory in Linux Shell or Putty?

How To View IP Configuration in Linux?

Viewing your IP configuration in Windows is quite easy and you can do it with a simple command like ipconfig, you can also view all connected applications and services using ipconfig /all.

Linux on the other hand also has a similar command that shows you the IP configuration of the machine.

To view the IP Configuration type in the command ifconfig, this will show you the IP address and other information related to your network cards/wireless adapters.

Easy as it gets, to learn more Linux Tips don’t forget to visit the Linux Tips,Linux,ip configuration,linux ip config,how to,tips and tricks