Changes
Jump to navigation
Jump to search
← Older edit
Linux: swap
(edit)
Revision as of 08:16, 11 November 2019
42 bytes added
,
08:16, 11 November 2019
m
→Create swap
Line 1:
Line 1:
−
== Create swap ==
+
==Create swap==
−
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
+
<syntaxhighlight lang="bash">
−
sudo
/sbin/mkswap
/var/swap.1
+
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
−
sudo
chmod 600
/var/swap.1
+
sudo
chmod 600
/var/swap.1
−
sudo /sbin/swapon /var/swap.1
+
sudo
/sbin/mkswap
/var/swap.1
−
+
sudo /sbin/swapon /var/swap.1
−
If you need more than 1024 then change that to something higher.<br />
+
</syntaxhighlight>
If you need more than 1024 then change that to something higher.<br />
To enable it by default after reboot, add this line to /etc/fstab:<br />
To enable it by default after reboot, add this line to /etc/fstab:<br />
/var/swap.1 none swap sw 0 0
/var/swap.1 none swap sw 0 0
−
== Modify swap partition ==
+
==Modify swap partition==
swapoff /dev/sda3
swapoff /dev/sda3
mkswap /dev/sda4
mkswap /dev/sda4
Rafahsolis
Bureaucrats
,
Administrators
2,306
edits
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version