SlackwareThis Forum is for the discussion of Slackware Linux.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I was wondering about the swap file. I did not create one when installing slack 10. I have 512 MB of ram, do I need a swap file? And if so, can one be created now, after I have already done my installation?
Well, I guess I dont need one, then. This comp is just for running my various servers and learning how to use linux and it's applications. I have a windows box set up specifically for all my gaming needs.
For proper performance i'm pretty sure linux requires a swap file. The kernel expects it to be there and as such the mem management is built to take advantage of it. If it is not there, you may see performance losses, even if it doesn't look like swap is being used. Also, since your using your box as a server, you don't want some memory leak taking it down, you need a certain amount of redundancy that swapspace provides. It's not like it takes a whole lot of space, you only need like 250-500mb.
It's easy to make swap space after the install, the hard part is partitioning it. But once you have the partition and have made the entry into fstab for it just do:
Well, that depends on alot of things, like what filesystem your using and how many partitions you have and where they are mounted.
For all intents and purposes you will likely have to delete a partition and split off a chunk for swap space, then recreate the partition. I have no clue about resizing partitions in linux, but it is highly dependant on what filesystem you use, and I think it is not very reliable/easy in any case. This question is enough for a whole seperate thread, it's a suprisingly difficult issue if you do not want to delete any of your partitions which you already have or lose data on them.
You can check out this project for info about resizing partitions.
But it would be much easier to simply set up a swap file. The performance is slightly less than with a dedicated partition, but since you have 512Megs of RAM and are seeing little swap use anyway, the only need for swap is for insurance in case your system should exhaust the actual memory.
You can set up a swap file with the following steps:
This will create a 512Mb swap file in your root directory. To check that it has worked, run the command 'free' and it should show your physical, as well as swap memory. To have this swap setup on each reboot, add the following line to /etc/fstab:
sh1ft is absolutely right. Even if you have huge amounts of RAM, every nowand then the kernel will deem it prudent to swap out a few KB, or even less. If there is NO swap available, more time is lost looking for it than would be lost in doing it. You can always create a small SWAPFILE(not partition) in your /root dirlike this
dd if=/dev/zero of=/root/swapfile bs=512k count=1
/root/swapfile swap swap defaults 0 0
in your /etc/fstab and be done with it.
ZipSlack comes with a 512KB swapfile like this, and the install.zip installer has a 10MB swapfile.
It's worth noting that the minimum size of swap allowed is only 4K! Some machines will seize up without any swap at all.