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. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
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 3 years 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 so much better 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 so much better 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 so much better 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 so much better 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
-
You can’t handle me
by
Susan Bradley
51 minutes ago -
Chrome Can Now Change Your Weak Passwords for You
by
Alex5723
5 hours, 5 minutes ago -
Microsoft: Over 394,000 Windows PCs infected by Lumma malware, affects Chrome..
by
Alex5723
6 hours, 12 minutes ago -
Signal vs Microsoft’s Recall ; By Default, Signal Doesn’t Recall
by
Alex5723
6 hours, 24 minutes ago -
Internet Archive : This is where all of The Internet is stored
by
Alex5723
6 hours, 36 minutes ago -
iPhone 7 Plus and the iPhone 8 on Vantage list
by
Alex5723
6 hours, 41 minutes ago -
Lumma malware takedown
by
EyesOnWindows
13 hours, 55 minutes ago -
“kill switches” found in Chinese made power inverters
by
Alex5723
15 hours, 29 minutes ago -
Windows 11 – InControl vs pausing Windows updates
by
Kathy Stevens
15 hours, 23 minutes ago -
Meet Gemini in Chrome
by
Alex5723
19 hours, 29 minutes ago -
DuckDuckGo’s Duck.ai added GPT-4o mini
by
Alex5723
19 hours, 37 minutes ago -
Trump signs Take It Down Act
by
Alex5723
1 day, 3 hours ago -
Do you have a maintenance window?
by
Susan Bradley
14 hours, 45 minutes ago -
Freshly discovered bug in OpenPGP.js undermines whole point of encrypted comms
by
Nibbled To Death By Ducks
5 hours, 48 minutes ago -
Cox Communications and Charter Communications to merge
by
not so anon
1 day, 6 hours ago -
Help with WD usb driver on Windows 11
by
Tex265
1 day, 12 hours ago -
hibernate activation
by
e_belmont
1 day, 15 hours ago -
Red Hat Enterprise Linux 10 with AI assistant
by
Alex5723
1 day, 19 hours ago -
Windows 11 Insider Preview build 26200.5603 released to DEV
by
joep517
1 day, 22 hours ago -
Windows 11 Insider Preview build 26120.4151 (24H2) released to BETA
by
joep517
1 day, 22 hours ago -
Fixing Windows 24H2 failed KB5058411 install
by
Alex5723
18 hours, 49 minutes ago -
Out of band for Windows 10
by
Susan Bradley
2 days, 3 hours ago -
Giving UniGetUi a test run.
by
RetiredGeek
2 days, 10 hours ago -
Windows 11 Insider Preview Build 26100.4188 (24H2) released to Release Preview
by
joep517
2 days, 18 hours ago -
Microsoft is now putting quantum encryption in Windows builds
by
Alex5723
13 hours, 49 minutes ago -
Auto Time Zone Adjustment
by
wadeer
2 days, 22 hours ago -
To download Win 11 Pro 23H2 ISO.
by
Eddieloh
2 days, 20 hours ago -
Manage your browsing experience with Edge
by
Mary Branscombe
1 hour, 13 minutes ago -
Fewer vulnerabilities, larger updates
by
Susan Bradley
1 day, 13 hours ago -
Hobbies — There’s free software for that!
by
Deanna McElveen
13 hours, 18 minutes 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.