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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I note that you posted a command that was, apparently, run in a "root" terminal. (Judging from the "#" at the start of the command.)
If that's the case, may I suggest that you "cease-and-desist" running with "root" privileges until you're more familiar with Linux commands? You can do almost everything except make catastrophic mistakes using a regular account, especially if you've added yourself to the sudoers file.
Note that this is advice only. It's your system, and your problem if you mess up.
And, to answer your question, just unlink (with rm)the file that the link command will have created.
If you did "ln -s [path]," it would do nothing more than create a symbolic link ("symlink") to a folder or file. The resulting link often appears in midnight commander prefaced by a tilde ("~").
You could undo it by deleting the link, either through a graphical file manager or a terminal command.
With an "ls" command, there is nothing to undo.
There is a good section on symlinks in the Slackbook.
I have to agree with PTrenholme, you really need to do a little reading before trying out commands logged in as "root". Even a Linux for Dummies book (no insult intended) would be a good place to start. Or a Linux tutorial online. Start with the basic commands... and go from there. I used to teach Unix, and the "ls" command was one of the first ones we teach.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.