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.
I use a command on a semi regular basis thats a bind to type out. Is there a way of automating it? I'm not familiar with programming or scripting so any pointers would be great. I've currently saved it as a text file and paste it in when required, but to be able to just type a shortcut for it like ls or whatever would be great.
so you have it in a file, I'll call it "text". Wouldn't
That is, typing ./text at the comand prompt. You could have the file in your user's directory under home, and then all you'd have to do is open a terminal and type ./text. Your file might resemble this:
<Your stuff you do>
I don't know for sure if that works, and I bet it's not the best way either. I'm a newbie too, I'm just trying to give back.
sounds like perhaps you're not using a bash shell. I am a total newbie, so I am not familiar with any other shells. Nor am I familiar with Suse.
Do you have any idea what kind of shell you're using?
If I understand correctly, the alias worked at some point. Could you detail what you did when you created the alias, what you did right after creating it that made it work, and finally what you did between the time it worked and when it stopped working.
i'm sure i'm using bash. it just seems that the alias only works until i close the terminal. when i try again bash reports that the command is not found. there must be a file somewhere that needs altering but i don't know which one.
A) there's the bash history ...
Ctrl-R and starting to type a part of the command will
bring it back.
B) You can put the alias definition in ~/.bashrc
or ~/bash_profile (whichever is appropriate on
The ~/.bash_profile command is executed when you first log on. ~/.bashrc is executed when starting an interactive shell. You probably want to add the alias definition in ~/.bash_profile so that it is available as soon as you log on.
If you want the alias defined for all users. Then add the alias definition to /etc/profile.d/bash.sh.