Automatically Run a Command at Startup on Slackware

April 18, 2022

To automatically run a command at startup on Slackware, do the following as root in the shell.

  1. If you are not already, become the root user: su –.
  2. Make a backup copy of the rc.local file: cp /etc/rc.d/rc.local /etc/rc.d/rc.local.bak.
  3. Edit the rc.local file with your favorite text editor. Here is how with Nano: nano /etc/rc.d/rc.local.
  4. Add a line with the command that you would like run at startup.
  5. Save the changes: Ctrl-O (while holding down the Ctrl key, press the O key).
  6. Exit the Nano program: Ctrl-X (while holding down the Ctrl key, press the X key).

Enabling Package Installation on NetBSD

April 16, 2022

To enable package installation on NetBSD, do the following as root in the shell.

  1. If you are not already, become the root user: su –.
  2. Define the package path variable: PKG_PATH=”http://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -p)/$(uname -r|cut -f ‘1 2’ -d.)/All/“.
  3. Export the package path variable: export PKG_PATH.
  4. Install the pkgin program: pkg_add pkgin.

Enabling DHCP on NetBSD

April 16, 2022

To enable DHCP on NetBSD, do the following as root in the shell.

  1. If you are not already, become the root user: su –.
  2. Make a backup copy of the /etc/rc.conf file: cp /etc/rc.conf /etc/rc.conf.bak.
  3. Edit the rc.conf file with your favorite text editor. Here is how with Nano: nano /etc/rc.conf.
  4. Add the line: dhcpcd=YES.
  5. Start the DHCPCD service: service dhcpcd start.
  6. Save the changes: Ctrl-O (while holding down the Ctrl key, press the O key).
  7. Exit the Nano program: Ctrl-X (while holding down the Ctrl key, press the X key).