Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can someone please explain to me about the swap partition. I don't beleive I have one. How can I check to see if I do, and if I don't and i should use one, how do i create one? Does it speed up linux if i do have one?
Open a console and enter 'cat /etc/fstab' (sans quotes). This shows your mountable partitions. Swap is called swap and is mounted on swap with a swap file system. There should be something like this on almost any distro. I can't believe an installer would let you forget a swap partition. If you have plenty of RAM it shouldn't really matter but the people with the experience and know-how say we need one. Twice the amount of RAM is the normal size.
If you don't have one, a reinstall could be the easiest way to get one.
Swap is the same thing as virtual memory on windows OS. In a nut shell ( in reality its a little more complicated ) if you run out of physical ram, non active applications and data will be exchanged between RAM and the hard drive.
I think having a swap partition is a good idea. The 2x rule IMHO is outdated with lots of RAM. A 512 partition is a good size.
The console command free will tell you if swap is active. If total swap size is a non zero value its working.
Using swap space is slower since your using the hard drive. And in most cases unless your PC is a hard core web, mail and or database server it probably will use little or no space at all. If you need swap and do not have your machine will really slow down and it might crash.
Since 'cat /proc/swap' won't work on my machine and 'free' may not work on yours (although it should), yet another method is ' ps -A | grep swap' which will show if the swap daemon is running.
thank you for all your help guys. Sorry I haven't replied earlier but i have been super busy with school work and stuff. But i am gonna use what was written here and take a look at it. Thanks.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.