Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
If you're using KDE you can place it in ~/.kde/Autostart and it will run whenever you start your kde session. I know gnome has a similar folder somewhere as well.
I don't think placing it in ~/.bashrc is a good idea, because then it will run every time you open a new bash shell, not just on startup. Unless you want that behavior, of course.
Oh, and placing the script in /usr/local/bin will only allow you to run it by name only if that directory is set in your PATH variable. Most distros add this by default, but it's not guaranteed. /usr/local/bin is one of the recommended traditional locations in which to keep personal scripts and programs, however.
Last edited by David the H.; 10-08-2008 at 10:23 AM.
I wrote my first useful shell script! now I would like to make it run as soon as I log in. where should I put the shell scrip to auto run?
From the man page for bash:
When bash is invoked as an interactive login shell, or as a
non-interactive shell with the --login option, it first reads
and executes commands from the file /etc/profile, if that
file exists. After reading that file, it looks for
~/.bash_profile, ~/.bash_login, and ~/.profile, in that order,
and reads and executes commands from the first one that exists
and is readable. The --noprofile option may be used when the
shell is started to inhibit this behavior.
You can call it from one of those files. If none of those files exist, you can create them.