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.
1. In short, /bin/bash is the path to an executable. The bash executable is a command interpreter using a simple terminal line interface. It is also very easy to use script files that contain command lines to create simple applications.
2. Not much. The shutdown command provides more flexibility than the poweroff command. Most distributions have the poweroff command linked to the shutdown command - which in turn may be linked to yet another. But the purpose of the power off is the same as "shutdown -P -h now", and if the shutdown (which may be a script) will use the name it was invoked by to identify a predefined set of options. It is also possible that the poweroff is linked to a "halt" utility - which should only be used for emergencies, as the halt utility directly is intended to halt the system immediately. On Slakware, the halt utility (or poweroff) will first verify that the system is in single user mode before halting/poweroff the system - instead, it will invoke the shutdown utility with the appropriate options to gracefully shutdown the system, then either halt or power off.
To be a bit more specific, the first line of a script file that is marked as executable should/must start with "#!" followed by the path to the program (or script even) that is to interpret the contents.
This is not, however, a property of a script - it is the property of the kernel validating a file for execution - and when the "#!" is found, using the rest of the line interpreted as the command (with options) to interpret the file.
Every system has a root directory which holds all files and sub directories. Root is give the symbol /. Bin is a subdirectory called simply as bin and if given together with root as /bin. bash is executable file located in bin directory. So it's refered as /bin/bash. The / acts as separator for directories and files.
As for commands shutdown poweroff halt just use safe ones for now. And if you want to know more details you can read their man pages by: