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.
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
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, 1 month 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
-
KB5058379 / KB 5061768 Failures
by
crown
2 hours, 17 minutes ago -
Windows 10 23H2 Good to Update to ?
by
jkitc
2 hours, 26 minutes ago -
At last – installation of 24H2
by
Botswana12
3 hours, 10 minutes ago -
MS-DEFCON 4: As good as it gets
by
Susan Bradley
6 minutes ago -
RyTuneX optimize Windows 10/11 tool
by
Alex5723
15 hours, 22 minutes ago -
Can I just update from Win11 22H2 to 23H2?
by
Dave Easley
8 hours, 42 minutes ago -
Limited account permission error related to Windows Update
by
gtd12345
1 day, 4 hours ago -
Another test post
by
gtd12345
1 day, 4 hours ago -
Connect to someone else computer
by
wadeer
23 hours, 21 minutes ago -
Limit on User names?
by
CWBillow
1 day, 2 hours ago -
Choose the right apps for traveling
by
Peter Deegan
16 hours, 22 minutes ago -
BitLocker rears its head
by
Susan Bradley
23 minutes ago -
Who are you? (2025 edition)
by
Will Fastie
2 hours, 11 minutes ago -
AskWoody at the computer museum, round two
by
Will Fastie
18 hours, 44 minutes ago -
A smarter, simpler Firefox address bar
by
Alex5723
1 day, 15 hours ago -
Woody
by
Scott
2 days ago -
24H2 has suppressed my favoured spider
by
Davidhs
1 day ago -
GeForce RTX 5060 in certain motherboards could experience blank screens
by
Alex5723
2 days, 14 hours ago -
MS Office 365 Home on MAC
by
MickIver
2 days, 8 hours ago -
Google’s Veo3 video generator. Before you ask: yes, everything is AI here
by
Alex5723
3 days, 4 hours ago -
Flash Drive Eject Error for Still In Use
by
J9438
3 hours, 46 minutes ago -
Windows 11 Insider Preview build 27863 released to Canary
by
joep517
3 days, 23 hours ago -
Windows 11 Insider Preview build 26120.4161 (24H2) released to BETA
by
joep517
3 days, 23 hours ago -
AI model turns to blackmail when engineers try to take it offline
by
Cybertooth
3 days, 3 hours ago -
Migrate off MS365 to Apple Products
by
dmt_3904
3 days, 4 hours ago -
Login screen icon
by
CWBillow
2 days, 18 hours ago -
AI coming to everything
by
Susan Bradley
9 hours, 12 minutes ago -
Mozilla : Pocket shuts down July 8, 2025, Fakespot shuts down on July 1, 2025
by
Alex5723
4 days, 15 hours ago -
No Screen TurnOff???
by
CWBillow
4 days, 15 hours ago -
Identify a dynamic range to then be used in another formula
by
BigDaddy07
4 days, 16 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.