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'm using redhat 9.
i am root.
when I am in /etc then "ln -s ls doit" works fine
but the point of a link is to link from somewhere else so
I tried it in "/home/user1" but it gives me that error.
i can say "touch test" and it creates the file no problem
what am i missing?
how can I create a simple symbolic link to another file?
Just what are you trying to do, anyway? It seems like what you really want is an alias, not a symbolic link.
What error are you getting?
If you're trying to type in "doit" and it doesn't find the command, then that's probably because "." is NOT in the user's $PATH. This is a good safety precaution, because it makes it more difficult for someone to insert a fake version of a common command.
I wanted to ask the same thing: what error do you get? Is the link created or not?
Because if the link is created, then another possibility (apart that "." is not in your path) is that /etc/ls doesn't exist. At least, in my system, there is a /bin/ls, but not /etc/ls. Yet the link to /etc/ls can be created, and when I run "ls" it blinks because it is pointing to no-where.
Last edited by enemorales; 03-09-2005 at 10:35 AM.
OK, as enemorales pointed out, this is wrong of course:
ln -s /etc/ls doit
and this is right:
ln -s /bin/ls doit
since "ls" is in the /bin directory
So now I understand ln much better, got things to work.
And yes, the above would be better done with "alias".
I tried it with a directory (which is the purpose of ln as I understand it) and it worked to so this is RESOLVED.
Originally posted by enemorales /etc/ls doesn't exist. At least, in my system, there is a /bin/ls, but not /etc/ls.
At my last job I actually dealt with SCO boxes, you'd be surprised at what is placed in the /etc directory, that's why I took the question at face value instead of asking the person if they were sure that ls was in /etc.