Permission Denied
Hello,
I am trying to learn how to use Linux. I installed Mandrake 10 and I am using the KDE enviroment. When I try to do anything in the shell I get a Permission Denied error. For example if I switch to root using su and then type in /etc/hosts it comes up with Permission Denied. I'm totally stumped on how to get past this. Any suggestions would be great? |
Just typing /etc/hosts won't get you very far :) What do you want to do ? To edit, type: vim /etc/hosts (or emacs /etc/hosts, if you're that way inclined... ;) To read, type: less /etc/hosts, and so on.
Cheers, mj |
You get permission denied when you try to run a file that's not executable. Typing "/bin/ls" should work, whereas the text file /etc/hosts will not. To view it, you use a text editor. For example, "vi /etc/hosts".
|
If you start editing with vi, to quit type
Code:
:q! hey aaa, you sure crazy about wiki! check my website out and see if it is your cup of tea. |
Thank You
Big Thanks for all your info. It was driving me crazy. I really like Linux but guess theres alot to learn.
|
As a side comment, one of the easiest text editors to use is pico because it always displays the key combinations for common actions at the bottom of the screen. vi and vim are both powerful, but at least to me they aren't as easy to use as pico. Just my 2 cents -- J.W.
|
If you're in KDE then kwrite /etc/hosts :) Nice GUI and everything ;)
|
...and use :wq if you actually want to save your changes within Vim, if this is what you end up using (:q! will leave you back where you started !).
|
Keep in mind also that if you just want to see the contents of a file (assuming it is a text file) you can use "cat" like this: cat /etc/fstab or cat /etc/hosts.
Hope this helps |
All times are GMT -5. The time now is 02:19 PM. |