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!
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 am new to Linux, so hopefully this question won't be hard for you folks.
I installed Red Hat 7.2 last week with 48 megs of RAM and a swap size of 180 MB. Yesterday, I got another 128 megs of RAM and installed it in the computer. I read that the swap space should be twice the amount of RAM, so now I want to increase the swap space by another 180 MB or so.
I read that the way to do this is using the cfdisk or fdisk command. However, when I try typing either of those commands in the shell window (I currently have it set up to use GNOME), I get the error message 'Command Not Found'. Why is this?
Could those commands have not gotten installed when I installed the OS? If so, where are they and how do i install them now? Or, can I not use cfdisk from within GNOME? If so, how do i get out of GNOME?
Then I assume they are not installed. Which is odd enough of course, but i've found alot of oddness in RH's package installs and what it defaults to. You'll wanna find the install CD that has the util-linux 2.11(x) rpm Probably on the first i'd assume.
OK, i used the rpm command to see if the util-linux 2.11 package was already on my computer and it was. So then I tried logging out and logging back in as root (instead of using su). After I did this I was able to access the fdisk command - but not cfdisk. I tried to create a swap partition using fdisk and partially succeeded. I was able to create the partition - but when I looked at it through GNOME's hardware browser it says its type is 'None' instead of 'linux-swap', like my other swap partition says. When I created the partition I gave it the system ID of 82. And when I go back and look at it in fdisk, it says that its type is Linux Swap.
So now I have a few questions:
1) Why does the Hardware Browser say that the partition type is 'None'? Does this mean I didn't create the partition right, or is the Hardware Browser program just buggy? Or am I only allowed to have one swap partition ?
2) Why can I still not use cfdisk? Is it in another package, or should I try reinstalling the util-linux package?
3) Are there any advantages to using cfdisk over fdisk - does it do the job any better or is it just a better interface?
It's probably fine if you set the partitions up as the correct types. The hardware browser is something i've never worried about. If it works it works. It may be that RedHat decided not to put cfdisk in their distro of the util package, you got me there. As far as cfdisk, yeah, it's a helluva lot easier to use. It's alot like DOS's fdisk. Black & white text UI. Makes setting types etc,... very easy. You could probably just get the source package from the GNU website and install that instead.
su - worked like a charm. And no, I did not use the mkswap command - I didn't know I had to. So what are the steps involved in creating a new swap partition? First you have to use fdisk to create the partition. Then use mkswap, and is that it? I was looking through the mkswap man page, and they reference the swapon command as well as the /etc/fstab file. Do I have to run the swapon command and/or edit the /etc/fstab file as well? Thanks for all the help!
Yep. You create the swap partition. Next run mkswap /dev/hdXY. Replace the XY with the correct partition info. Edit your /etc/fstab. Add a line like this: /dev/hdXY swap swap defaults 0 0. Then run swapon -a to initialize it. The next time that you boot up the new swap file will automatically be initialized.