Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

swapon at bootup

Posted on 1997-03-14
1
Medium Priority
?
386 Views
Last Modified: 2013-12-15
Right now I do my swapon command manually after bootup.
In what file would I place this command to get the swap
activated automatically at boot?
0
Comment
Question by:jaanders
1 Comment
 

Accepted Solution

by:
timc earned 100 total points
ID: 1626990
It may depend on your flavour of Linux.

Using SysV style inits, the /etc/rc.d/rc.sysinit script contains some lines just after the network configuration call which say:

# Start up swapping.
echo "Activating swap partitions"
swapon -a

This is typical of your RedHat Linux's ...

If it's Slackware, perhaps look in /etc/rc.d/rc.S.  After the path statement, you can swapon there, e.g.

#!/bin/sh
#
# /etc/rc.d/rc.S:  System initialization script.
#

PATH=/sbin:/usr/sbin:/bin:/usr/bin

# enable swapping
/sbin/swapon -a

 etc ...

Does that help?

0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month10 days, 1 hour left to enroll

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question