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.
Hello chaps, I'm totally new to shell scripting and I'm reading a few tutorials. Now, they say that the script should be placed inside a bin folder and that often this folder needs to be created. I'm running ubuntu 12.04 and I do have this folder already and it's full of all sort of stuff from executables to whatnot. Now, one of the first things the tutorial said was to create an empty file inside the bin folder, with the following command
but I got a permission denied error. So, I prefixed it with the sudo command and everything went OK. So I wonder, is this normal? Do I have to prefix every command I run for the bin folder with sudo - seems a bit odd - or did I get things wrong and in fact I do need to create another bin folder elsewhere?
Generally tutorials tell you to put a "bin" in your users home directory and append it to your users $PATH, not test scripts in /bin which is part of the systems $PATH.
The first lets you execute your new scripts from any location in the file system.
The second is a recipe for disaster.
You're doing the second.
What I do is create a directory in which I work on scripts and go there to write and test them (at first). Once I know it executes more or less as I expected, I move it somewhere it can do some real damage (and append the somewhere to the system $PATH if I have to).
Having the $PATH variable include your scriptorium is not really neccessary (or even desirable) during development. Untested scripts tend to have unintended consequences so a little care saves a lot of time.
Last edited by dijetlo; 09-27-2014 at 12:04 PM.
Reason: IS...IF... little difference are important...