Find swapfile location in Linux Mint2019 Community Moderator ElectionWhy my partitions don't show the right capacity on a 4096 byte physical block hard drive?How to safely turn off swap permanently and reclaim the space? (on Debian Jessie)Is it possible to change the priority of a swapfile without turning it off?compressed swapfile (without zram or zswap)Making swapfile for t1.micro Amazon EC2 instance with Amazon LinuxHow do I remove a swap partition that no longer exists?Is this how linux paging should behave? (because it seems awful…)Can't create a swapfile for Solaris 11.3How can I zerofill the /swapfile without wiping out what makes it a swapfile?Ubuntu 14.04 32 bit swapfile max 60k issue
Why are on-board computers allowed to change controls without notifying the pilots?
Can somebody explain Brexit in a few child-proof sentences?
Lay out the Carpet
Are there any thematic similarities between Shostakovichs' Symphony 5th and Beethovens' 7th symphony?
Hostile work environment after whistle-blowing on coworker and our boss. What do I do?
Implement the Thanos sorting algorithm
What is the intuitive meaning of having a linear relationship between the logs of two variables?
Is there a good way to store credentials outside of a password manager?
Are Warlocks Arcane or Divine?
Time travel short story where a man arrives in the late 19th century in a time machine and then sends the machine back into the past
Was the picture area of a CRT a parallelogram (instead of a true rectangle)?
Why Were Madagascar and New Zealand Discovered So Late?
What does the word "foliage" mean here?
Short story about robots exploring another planet whose inhabitants thought the robots were inferior
Efficiently merge handle parallel feature branches in SFDX
how to analyze "是其于主也至忠矣"
What's the purpose of "true" in bash "if sudo true; then"
Finding all intervals that match predicate in vector
Failed to fetch jessie backports repository
How do I keep an essay about "feeling flat" from feeling flat?
Is there a problem with hiding "forgot password" until it's needed?
The baby cries all morning
What is the opposite of 'gravitas'?
Is it correct to write "is not focus on"?
Find swapfile location in Linux Mint
2019 Community Moderator ElectionWhy my partitions don't show the right capacity on a 4096 byte physical block hard drive?How to safely turn off swap permanently and reclaim the space? (on Debian Jessie)Is it possible to change the priority of a swapfile without turning it off?compressed swapfile (without zram or zswap)Making swapfile for t1.micro Amazon EC2 instance with Amazon LinuxHow do I remove a swap partition that no longer exists?Is this how linux paging should behave? (because it seems awful…)Can't create a swapfile for Solaris 11.3How can I zerofill the /swapfile without wiping out what makes it a swapfile?Ubuntu 14.04 32 bit swapfile max 60k issue
I want to increase my swap size to be able to have the hibernate option. First, I tried to add some swapfile. I followed
https://bogdancornianu.com/change-swap-size-in-ubuntu/
and typed this in my terminal:
sudo dd if=/dev/zero of=swapfile bs=1G count=16
I get:
16+0 records in
16+0 records out
17179869184 bytes (17 GB, 16 GiB) copied, 206.949 s, 83.0 MB/s
then, I followed the instructions:
sudo mkswap /swapfile
But I get this error:
mkswap: cannot open /swapfile: No such file or directory
Then, I decided to resize my swap partition instead of swapfile. So I want to delete them. (I didn't create any before so I assume I can delete them all?)
I followed this:
https://askubuntu.com/questions/904628/default-17-04-swap-file-location
I tried:
$ cat /proc/swaps
$ grep swap /etc/fstab
But I get nothing from the first one. Output from the second one is:
total used free shared buff/cache
available
Mem: 11862 3498 1014 138 7349
7907
Swap: 0 0 0
I also tried (after reboot):
swapon -s
and get
Filename Type Size Used Priority
/dev/sdb3 partition 3905532 0 -2
I wonder that did I successfully create swapfiles? How do I delete them if I did?
swap
New contributor
Frank Wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I want to increase my swap size to be able to have the hibernate option. First, I tried to add some swapfile. I followed
https://bogdancornianu.com/change-swap-size-in-ubuntu/
and typed this in my terminal:
sudo dd if=/dev/zero of=swapfile bs=1G count=16
I get:
16+0 records in
16+0 records out
17179869184 bytes (17 GB, 16 GiB) copied, 206.949 s, 83.0 MB/s
then, I followed the instructions:
sudo mkswap /swapfile
But I get this error:
mkswap: cannot open /swapfile: No such file or directory
Then, I decided to resize my swap partition instead of swapfile. So I want to delete them. (I didn't create any before so I assume I can delete them all?)
I followed this:
https://askubuntu.com/questions/904628/default-17-04-swap-file-location
I tried:
$ cat /proc/swaps
$ grep swap /etc/fstab
But I get nothing from the first one. Output from the second one is:
total used free shared buff/cache
available
Mem: 11862 3498 1014 138 7349
7907
Swap: 0 0 0
I also tried (after reboot):
swapon -s
and get
Filename Type Size Used Priority
/dev/sdb3 partition 3905532 0 -2
I wonder that did I successfully create swapfiles? How do I delete them if I did?
swap
New contributor
Frank Wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Hello, our new contributor! Please read our guidelines, and maybe more important note: You should really really read properly what you are typing, there is no space for typos in Linux!
– Vlastimil
2 hours ago
add a comment |
I want to increase my swap size to be able to have the hibernate option. First, I tried to add some swapfile. I followed
https://bogdancornianu.com/change-swap-size-in-ubuntu/
and typed this in my terminal:
sudo dd if=/dev/zero of=swapfile bs=1G count=16
I get:
16+0 records in
16+0 records out
17179869184 bytes (17 GB, 16 GiB) copied, 206.949 s, 83.0 MB/s
then, I followed the instructions:
sudo mkswap /swapfile
But I get this error:
mkswap: cannot open /swapfile: No such file or directory
Then, I decided to resize my swap partition instead of swapfile. So I want to delete them. (I didn't create any before so I assume I can delete them all?)
I followed this:
https://askubuntu.com/questions/904628/default-17-04-swap-file-location
I tried:
$ cat /proc/swaps
$ grep swap /etc/fstab
But I get nothing from the first one. Output from the second one is:
total used free shared buff/cache
available
Mem: 11862 3498 1014 138 7349
7907
Swap: 0 0 0
I also tried (after reboot):
swapon -s
and get
Filename Type Size Used Priority
/dev/sdb3 partition 3905532 0 -2
I wonder that did I successfully create swapfiles? How do I delete them if I did?
swap
New contributor
Frank Wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I want to increase my swap size to be able to have the hibernate option. First, I tried to add some swapfile. I followed
https://bogdancornianu.com/change-swap-size-in-ubuntu/
and typed this in my terminal:
sudo dd if=/dev/zero of=swapfile bs=1G count=16
I get:
16+0 records in
16+0 records out
17179869184 bytes (17 GB, 16 GiB) copied, 206.949 s, 83.0 MB/s
then, I followed the instructions:
sudo mkswap /swapfile
But I get this error:
mkswap: cannot open /swapfile: No such file or directory
Then, I decided to resize my swap partition instead of swapfile. So I want to delete them. (I didn't create any before so I assume I can delete them all?)
I followed this:
https://askubuntu.com/questions/904628/default-17-04-swap-file-location
I tried:
$ cat /proc/swaps
$ grep swap /etc/fstab
But I get nothing from the first one. Output from the second one is:
total used free shared buff/cache
available
Mem: 11862 3498 1014 138 7349
7907
Swap: 0 0 0
I also tried (after reboot):
swapon -s
and get
Filename Type Size Used Priority
/dev/sdb3 partition 3905532 0 -2
I wonder that did I successfully create swapfiles? How do I delete them if I did?
swap
swap
New contributor
Frank Wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Frank Wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 34 mins ago
Rui F Ribeiro
41.7k1483142
41.7k1483142
New contributor
Frank Wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 3 hours ago
Frank WangFrank Wang
161
161
New contributor
Frank Wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Frank Wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Frank Wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Hello, our new contributor! Please read our guidelines, and maybe more important note: You should really really read properly what you are typing, there is no space for typos in Linux!
– Vlastimil
2 hours ago
add a comment |
Hello, our new contributor! Please read our guidelines, and maybe more important note: You should really really read properly what you are typing, there is no space for typos in Linux!
– Vlastimil
2 hours ago
Hello, our new contributor! Please read our guidelines, and maybe more important note: You should really really read properly what you are typing, there is no space for typos in Linux!
– Vlastimil
2 hours ago
Hello, our new contributor! Please read our guidelines, and maybe more important note: You should really really read properly what you are typing, there is no space for typos in Linux!
– Vlastimil
2 hours ago
add a comment |
3 Answers
3
active
oldest
votes
You made a typo:
of=swapfile
should be
of=/swapfile
the guide creates the swap file in the root directory, whereas the command that you entered would have created a swap file in your current directory.
New contributor
JShorthouse is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
The first issue is that your first command created a file, swapfile, in your current directory, and that all subsequent commands were explicitly referencing /swapfile, a file called swapfile in the root directory. If that was not your current working directory when you executed the first command, all of the subsequent commands would be referring to a file that is not there to operate upon.
If you got no output from cat /proc/swaps, that indicates that either your system does not have procfs running (unlikely), or that you currently have no active swap space configured.
The output you claim to get from grep swap /etc/fstab makes no sense whatsoever. That looks like the output of free -m (incidentally confirming that you have no active swap configured), not the partial contents of the filesystem table.
Your post-reboot swapon -s (which as the manual states gives the same information as cat /proc/swaps) indicates that at some point prior to your reboot, someone executed swapoff.
add a comment |
Delete the swapfile(s) by
sudo swapoff -v /?/swapfile
where /? represents the directory where you inadvertently created an extra swapfile.
sudo nano /etc/fstab
allows you to edit fstab where you can delete any reference to /?/swapfile
sudo rm /?/swapfile
deletes the spurious swapfile.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Frank Wang is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f508781%2ffind-swapfile-location-in-linux-mint%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
You made a typo:
of=swapfile
should be
of=/swapfile
the guide creates the swap file in the root directory, whereas the command that you entered would have created a swap file in your current directory.
New contributor
JShorthouse is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
You made a typo:
of=swapfile
should be
of=/swapfile
the guide creates the swap file in the root directory, whereas the command that you entered would have created a swap file in your current directory.
New contributor
JShorthouse is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
You made a typo:
of=swapfile
should be
of=/swapfile
the guide creates the swap file in the root directory, whereas the command that you entered would have created a swap file in your current directory.
New contributor
JShorthouse is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
You made a typo:
of=swapfile
should be
of=/swapfile
the guide creates the swap file in the root directory, whereas the command that you entered would have created a swap file in your current directory.
New contributor
JShorthouse is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
JShorthouse is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered 3 hours ago
JShorthouseJShorthouse
3195
3195
New contributor
JShorthouse is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
JShorthouse is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
JShorthouse is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
The first issue is that your first command created a file, swapfile, in your current directory, and that all subsequent commands were explicitly referencing /swapfile, a file called swapfile in the root directory. If that was not your current working directory when you executed the first command, all of the subsequent commands would be referring to a file that is not there to operate upon.
If you got no output from cat /proc/swaps, that indicates that either your system does not have procfs running (unlikely), or that you currently have no active swap space configured.
The output you claim to get from grep swap /etc/fstab makes no sense whatsoever. That looks like the output of free -m (incidentally confirming that you have no active swap configured), not the partial contents of the filesystem table.
Your post-reboot swapon -s (which as the manual states gives the same information as cat /proc/swaps) indicates that at some point prior to your reboot, someone executed swapoff.
add a comment |
The first issue is that your first command created a file, swapfile, in your current directory, and that all subsequent commands were explicitly referencing /swapfile, a file called swapfile in the root directory. If that was not your current working directory when you executed the first command, all of the subsequent commands would be referring to a file that is not there to operate upon.
If you got no output from cat /proc/swaps, that indicates that either your system does not have procfs running (unlikely), or that you currently have no active swap space configured.
The output you claim to get from grep swap /etc/fstab makes no sense whatsoever. That looks like the output of free -m (incidentally confirming that you have no active swap configured), not the partial contents of the filesystem table.
Your post-reboot swapon -s (which as the manual states gives the same information as cat /proc/swaps) indicates that at some point prior to your reboot, someone executed swapoff.
add a comment |
The first issue is that your first command created a file, swapfile, in your current directory, and that all subsequent commands were explicitly referencing /swapfile, a file called swapfile in the root directory. If that was not your current working directory when you executed the first command, all of the subsequent commands would be referring to a file that is not there to operate upon.
If you got no output from cat /proc/swaps, that indicates that either your system does not have procfs running (unlikely), or that you currently have no active swap space configured.
The output you claim to get from grep swap /etc/fstab makes no sense whatsoever. That looks like the output of free -m (incidentally confirming that you have no active swap configured), not the partial contents of the filesystem table.
Your post-reboot swapon -s (which as the manual states gives the same information as cat /proc/swaps) indicates that at some point prior to your reboot, someone executed swapoff.
The first issue is that your first command created a file, swapfile, in your current directory, and that all subsequent commands were explicitly referencing /swapfile, a file called swapfile in the root directory. If that was not your current working directory when you executed the first command, all of the subsequent commands would be referring to a file that is not there to operate upon.
If you got no output from cat /proc/swaps, that indicates that either your system does not have procfs running (unlikely), or that you currently have no active swap space configured.
The output you claim to get from grep swap /etc/fstab makes no sense whatsoever. That looks like the output of free -m (incidentally confirming that you have no active swap configured), not the partial contents of the filesystem table.
Your post-reboot swapon -s (which as the manual states gives the same information as cat /proc/swaps) indicates that at some point prior to your reboot, someone executed swapoff.
answered 3 hours ago
DopeGhotiDopeGhoti
46.6k56190
46.6k56190
add a comment |
add a comment |
Delete the swapfile(s) by
sudo swapoff -v /?/swapfile
where /? represents the directory where you inadvertently created an extra swapfile.
sudo nano /etc/fstab
allows you to edit fstab where you can delete any reference to /?/swapfile
sudo rm /?/swapfile
deletes the spurious swapfile.
add a comment |
Delete the swapfile(s) by
sudo swapoff -v /?/swapfile
where /? represents the directory where you inadvertently created an extra swapfile.
sudo nano /etc/fstab
allows you to edit fstab where you can delete any reference to /?/swapfile
sudo rm /?/swapfile
deletes the spurious swapfile.
add a comment |
Delete the swapfile(s) by
sudo swapoff -v /?/swapfile
where /? represents the directory where you inadvertently created an extra swapfile.
sudo nano /etc/fstab
allows you to edit fstab where you can delete any reference to /?/swapfile
sudo rm /?/swapfile
deletes the spurious swapfile.
Delete the swapfile(s) by
sudo swapoff -v /?/swapfile
where /? represents the directory where you inadvertently created an extra swapfile.
sudo nano /etc/fstab
allows you to edit fstab where you can delete any reference to /?/swapfile
sudo rm /?/swapfile
deletes the spurious swapfile.
answered 29 mins ago
K7AAYK7AAY
798825
798825
add a comment |
add a comment |
Frank Wang is a new contributor. Be nice, and check out our Code of Conduct.
Frank Wang is a new contributor. Be nice, and check out our Code of Conduct.
Frank Wang is a new contributor. Be nice, and check out our Code of Conduct.
Frank Wang is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f508781%2ffind-swapfile-location-in-linux-mint%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Hello, our new contributor! Please read our guidelines, and maybe more important note: You should really really read properly what you are typing, there is no space for typos in Linux!
– Vlastimil
2 hours ago