mersenneforum.org Where is "swpon" and such in Debian buster?
 Register FAQ Search Today's Posts Mark Forums Read

 2022-03-27, 14:04 #1 EdH     "Ed Hall" Dec 2009 Adirondack Mtns 511010 Posts Where is "swpon" and such in Debian buster? Sorry for the rant, but why does the entire web show using swapon, etc. for Debian buster and none of my three buster machines have it? Am I that special? The web says it's part of util-linux, so reinstalled util-linux - nope, still not there: Code: # swapon --show bash: swapon: command not found The machine has a swap partition that is active. Additionally, I found a small section somewhere saying buster would gather up all the swap space found at boot and assign it. I added a swap partition via SD card and nope, not found, although I really didn't expect it to be that easy.
 2022-03-27, 14:13 #2 kruoli     "Oliver" Sep 2017 Porta Westfalica, DE 123210 Posts I found that sometimes PATH is not set correctly and /sbin is omitted. Can you call it by entering /sbin/swapon?
2022-03-27, 14:27   #3
EdH

"Ed Hall"
Dec 2009

2·5·7·73 Posts

Quote:
 Originally Posted by kruoli I found that sometimes PATH is not set correctly and /sbin is omitted. Can you call it by entering /sbin/swapon?
Yes, Thank You!

And, now that you jog my memory, whereis swapon tells me that:
Code:
$whereis swapon swapon: /sbin/swapon . . . And, indeed: Code: $ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games 2022-03-27, 16:14 #4 chris2be8 Sep 2009 3×11×73 Posts Quote:  Originally Posted by EdH And, indeed: Code: $ echo \$PATH /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
That looks like your path as a user account, not as root. You probably need to switch to root with su - or sudo -i to get the right path.

2022-03-27, 16:25   #5
EdH

"Ed Hall"
Dec 2009

2·5·7·73 Posts

Quote:
 Originally Posted by chris2be8 That looks like your path as a user account, not as root. You probably need to switch to root with su - or sudo -i to get the right path.
I was originally trying both under user and root (su). I added /sbin: to the front of the PATH variable via the ~/.bashrc file and it is now available under su.

Thanks for helping keep me straight.

 Similar Threads Thread Thread Starter Forum Replies Last Post Uncwilly Lounge 15 2020-04-14 18:35 paulunderwood Linux 5 2019-09-07 12:59 MooMoo2 Other Chess Games 5 2016-10-22 01:55 wildrabbitt Miscellaneous Math 11 2015-03-06 08:17 nitai1999 Software 7 2004-08-26 18:12

All times are UTC. The time now is 10:10.

Tue Dec 6 10:10:40 UTC 2022 up 110 days, 7:39, 0 users, load averages: 0.98, 1.06, 0.93