I just installed Linux for the first time (after 5 tries). I was trying to follow directions on creating a swap file from this website:
http://www.linux.com/news/software/applications/8208-all-about-linux-swap-space
It was my first time using the console, and I don't know if I succeeded or not. Is there some way to tell if it worked? Here is what I typed:
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
paul@knight:~/Desktop$ dd if=/dev/zero of =/swapfile bs=1024 count=1048576
dd: unrecognized operand `of'
Try `dd --help' for more information.
paul@knight:~/Desktop$ dd if=/dev/zero of=/swapfile bs=1024 count=1048576
dd: opening `/swapfile': Permission denied
paul@knight:~/Desktop$ sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576
[sudo] password for paul:
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.1 GB) copied, 49.6973 s, 21.6 MB/s
paul@knight:~/Desktop$ sudo mkswap /swapfile
mkswap: /swapfile: warning: don't erase bootbits sectors
on whole disk. Use -f to force.
Setting up swapspace version 1, size = 1048572 KiB
no label, UUID=5e900a84-03ca-4a00-ad60-df4784abc7ef
paul@knight:~/Desktop$ sudo swapon /swapfile
paul@knight:~/Desktop$ etc/fstab
bash: etc/fstab: No such file or directory
paul@knight:~/Desktop$ /etc/fstab/swapfile
bash: /etc/fstab/swapfile: Not a directory
paul@knight:~/Desktop$ /etc/fstab swapfile
bash: /etc/fstab: Permission denied
paul@knight:~/Desktop$ sudo /etc/fstab swapfile
sudo: /etc/fstab: command not found
paul@knight:~/Desktop$ /swapfile
bash: /swapfile: Permission denied
paul@knight:~/Desktop$ sudo /swapfile
sudo: /swapfile: command not found
paul@knight:~/Desktop$
I'm totally new at this. Also, my physical memory is 256 Mb and my swap space is about twice that (I think). My partition for Linux (Xubuntu 11.04) is 50 Gb.
Do I have a 1 Gb swap file now? Or just a hole in my hard drive?
Is a swap file as good as the swap space?
Thank you in advance!