Note: This article was originally published in 2014. Some steps, commands, or software versions may have changed. Check the current Ubuntu documentation for the latest information.

In this step-by-step guide, you’ll learn create directory in /var/run/ at startup in ubuntu. Ubuntu is a popular Linux distribution based on Debian, widely used for servers and development environments.

Prerequisites

Before you begin, make sure you have:

  • A system running Ubuntu (desktop or server edition)
  • Terminal access with sudo privileges
  • Basic familiarity with Linux command line

How to: Create directory in /var/run/ at start-up in Ubuntu

As you probably have already noticed, the /var/run directory is temporary storage used by your Ubuntu system. It is mapped to your RAM disk (Ubuntu uses I think about 10% of your RAM and creates a disk mount for it. This is used for folders like /var/run which store run time information for applications. Because of that you want the speed of RAM. So when you are trying to customize an application you come to realize that with each reboot your changes on /var/run are lost. So the question that comes to mind is: where is the configuration that establishes what gets created on startup on the /var/run directory? Well, after some research I came with the answer:  

(http://img.zemanta.com/zemified_h.png?x-id=98284446-0f58-43fa-80f9-a2e7e42cefe9)](http://www.zemanta.com/?px “Enhanced by Zemanta”)

Summary

You’ve successfully learned create directory in /var/run/ at startup in ubuntu. If you run into any issues, double-check the prerequisites and ensure your Ubuntu environment is properly configured.