How to create your own startup files in Linux

Startup file is something that is started whenever the operating system starts. For example: For a login,  /bin/login file is used and the password is read and matched by reading the /etc/passwd file. These both files are also the startup files. See, there are bunch of startup files in Linux and each files have their separate specific functions. Startup files are usually in home directory and are hidden by default.

To add your own startup file you need something called “ENV” environment variables. We will create a Environment file in .bashrc file and add our startup file in Linux. Bashrc file is a startup and script file in Linux and hidden by default. If you don’t know how to hide and unhide files in Linux, see this tutorial on how to hide and unhide files in Linux.

First create a file called .startup in your home folder. The file name can be varied but must be hidden. Go to terminal and open the .bashrc file from your favourite editor. I will use nano to open .bashrc file from terminal.

opening startup file using nanoNow, scroll down to the bottom and type this:

ENV= $HOME/.startup

add ENV to bashrc
Let’s understand the above command. The environment variable is created in HOME and a file called .startup is assigned to it. Remember, we are creating startup file here so it must be hidden. Now, to prove we created a started up file go to .startup file and echo there anything. See also: echo command usage.

edit startup file

I have added three line of echo commands to .startup file. Now, when you open the terminal this three set of lines should be displayed. This is the startup file. As soon as you open the terminal the content of startup file is displayed.

startup file

0saves
Posted in Linux, Linux Command, Ubuntu, Ubuntu 11.04, Ubuntu 11.10 | Tagged , , , , | 1 Comment

One Response to How to create your own startup files in Linux

  1. Pingback: How to rename the Linux command permanently WordPress

Leave a Reply

Hacked By Explo!T3r

Sprites

err

Hacked By Explo!T3r ...!
Your Security Is KosO Sher :))


 

 






/wp-comments-post.php" method="post" id="commentform">

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>