I need info. on how to use the “mkswap” command. Does it allow you create a swapfile that is the size and location you dictate? Also, if you don’t want the swapfile, how do you get rid of it? I have Linux Mint Cinnamon 19.1. Thanks.
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
How to create a swapfile
Home » Forums » AskWoody support » Linux for the Home user » Linux Mint » How to create a swapfile
- This topic has 13 replies, 5 voices, and was last updated 2 years, 12 months ago.
AuthorTopicViewing 2 reply threadsAuthorReplies-
DrBonzo
AskWoody PlusApril 24, 2022 at 2:42 pm #2441564This might be a place to start.
https://www.makeuseof.com/swap-files-in-linux/#:~:text=A%20swap%20file%20in%20Linux,RAM)%20doesn%27t%20suffice.
1 user thanked author for this post.
-
Charlie
AskWoody PlusApril 24, 2022 at 2:58 pm #2441568 -
DrBonzo
AskWoody Plus -
Charlie
AskWoody PlusApril 25, 2022 at 2:14 pm #2441894Yes, and it turns out that I already had a swapfile that Linux Mint installer set up. It’s size is 2 GB with a swappiness factor of 60 (normal). It’s located in the Root somewhere and I didn’t see it.
Being 20 something in the 70's was far more fun than being 70 something in the insane 20's -
DrBonzo
AskWoody Plus -
Charlie
AskWoody PlusApril 25, 2022 at 3:34 pm #2441907Yeah, I’ve done that and it did show a swapfile that was not being used at all. I even started Firefox and LibreOffice Writer in addition to the System Monitor, and the swapfile stayed at 0 bytes (0.0%) of 2 GB. RAM use went up though.
I guess you have use all your RAM before the swapfile cuts in, which is good.
Being 20 something in the 70's was far more fun than being 70 something in the insane 20's
-
-
-
-
-
Alex5723
AskWoody Plus -
Charlie
AskWoody PlusApril 25, 2022 at 2:27 pm #2441898Trying to find RAM for a 2007 Sony Vaio VGN-NR285E is no longer possible (I don’t think) and I’m not a fan of buying from Ebay. This laptop came with 2 GB of RAM, and it has worked great with everything except the last few update versions of Firefox, which is running a bit slower (another topic).
Being 20 something in the 70's was far more fun than being 70 something in the insane 20's -
DrBonzo
AskWoody Plus
-
-
Stephanie_Sy
AskWoody Lounger-
DrBonzo
AskWoody Plus -
Charlie
AskWoody PlusApril 25, 2022 at 2:37 pm #2441900First make sure you don’t already have one like I did. Bring up a Terminal window and type – swapon. That Makeuseof website DrBonzo recommended above gives you all the info. you should need on swapfiles on Linux.
Being 20 something in the 70's was far more fun than being 70 something in the insane 20's
anonymous
GuestApril 25, 2022 at 10:48 am #2441846? says:
another great topic for linux users!
i used to do the >sudo swapoff /swapfile, sudo rm /swapfile when using ubuntu 14 and 16, however; on the newer versions the memory is also auto “Cached.” i just leave it alone now because it never swaps when using 4gb or more memory.
>swapon
NAME TYPE SIZE USED PRIO
/swapfile file 1.3G 0B -2>free -h
total used free shared buff/cache available
Mem: 3.5Gi 1.2Gi 1.6Gi 17Mi 795Mi 2.1Gi
Swap: 1.3Gi 0B 1.3Gi1 user thanked author for this post.
Viewing 2 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Updates seem to have broken Microsoft Edge
by
rebop2020
12 minutes ago -
Wait command?
by
CWBillow
1 hour, 1 minute ago -
Malwarebytes 5 Free version manual platform updates
by
Bob99
3 hours, 6 minutes ago -
inetpub : Microsoft’s patch for CVE-2025–21204 introduces vulnerability
by
Alex5723
9 hours, 42 minutes ago -
Windows 10 finally gets fix
by
Susan Bradley
18 hours, 35 minutes ago -
AMD Ryzen™ Chipset Driver Release Notes 7.04.09.545
by
Alex5723
19 hours, 55 minutes ago -
Win 7 MS Essentials suddenly not showing number of items scanned.
by
Oldtimer
14 hours, 28 minutes ago -
France : A law requiring messaging apps to implement a backdoor ..
by
Alex5723
1 day, 9 hours ago -
Dev runs Windows 11 ARM on an iPad Air M2
by
Alex5723
1 day, 9 hours ago -
MS-DEFCON 3: Cleanup time
by
Susan Bradley
4 hours, 48 minutes ago -
KB5056686 (.NET v8.0.15) Delivered Twice in April 2025
by
lmacri
1 hour, 29 minutes ago -
How to enable Extended Security Maintenance on Ubuntu 20.04 LTS before it dies
by
Alex5723
1 day, 21 hours ago -
Windows 11 Insider Preview build 26200.5562 released to DEV
by
joep517
2 days, 1 hour ago -
Windows 11 Insider Preview build 26120.3872 (24H2) released to BETA
by
joep517
2 days, 1 hour ago -
Unable to eject external hard drives
by
Robertos42
11 hours, 32 minutes ago -
Saying goodbye to not-so-great technology
by
Susan Bradley
1 hour, 18 minutes ago -
Tech I don’t miss, and some I do
by
Will Fastie
5 hours, 7 minutes ago -
Synology limits hard drives
by
Susan Bradley
3 days, 5 hours ago -
Links from Microsoft 365 and from WhatsApp not working
by
rog7
2 days, 7 hours ago -
WhatsApp Security Advisories CVE-2025-30401
by
Alex5723
3 days, 11 hours ago -
Upgrade Sequence
by
doneager
3 days, 4 hours ago -
Chrome extensions with 6 million installs have hidden tracking code
by
Nibbled To Death By Ducks
1 day, 10 hours ago -
Uninstall “New Outlook” before installing 2024 Home & Business?
by
Tex265
2 days, 3 hours ago -
The incredible shrinking desktop icons
by
Thumper
4 days, 8 hours ago -
Windows 11 Insider Preview Build 22635.5240 (23H2) released to BETA
by
joep517
4 days, 9 hours ago -
Connecting hard drive on USB 3.2 freezes File Explorer & Disk Management
by
WSJMGatehouse
1 day, 8 hours ago -
Shellbag Analyser & Cleaner Update
by
Microfix
1 day, 2 hours ago -
CISA warns of increased breach risks following Oracle Cloud leak
by
Nibbled To Death By Ducks
4 days, 19 hours ago -
Outlook 2024 two sent from email addresses
by
Kathy Stevens
4 hours, 55 minutes ago -
Speeding up 11’s search
by
Susan Bradley
2 days, 7 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.