Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Terminal guide

Terminal guide
Thread Tools
Kingmeyya
Fresh-Faced Recruit
Join Date: May 2010
Status: Offline
Reply With Quote
May 6, 2010, 04:11 AM
 
I know i have been bothering you all recently but i realy needed the help like i do now,seems i misused terminal and now when i type sudo-s the sudo command is not found...i am having the latest mac os on late nov release macbook bought in in india a week ago....

Please help me fix the sudo command
     
sudowork
Fresh-Faced Recruit
Join Date: Apr 2010
Status: Offline
Reply With Quote
May 6, 2010, 07:04 AM
 
Maybe it's just a typo, but put a space between 'sudo' and '-s'. Alternatively use 'sudo su'.
If that doesn't work, then try this '/usr/bin/sudo -s'. If that works, then your PATH is wrong. Type $PATH and make sure that '/usr/bin' is part of it.
If that doesn't work, then make sure 'sudo' is actually in '/usr/bin'. Type 'ls /usr/bin/sudo' and make sure it echoes it back. If not, it will say No such file or directory.
sudo work
     
turtle777
Clinically Insane
Join Date: Jun 2001
Location: planning a comeback !
Status: Offline
Reply With Quote
May 6, 2010, 07:05 AM
 
It's impossible to help / fix w/o knowing what you did.

If you *really* broke sudo by accidentally deleting or modifying the OS, then most likely, only a clean install of the OS would fix it.

To be honest, maybe you shouldn't use sudo until you are REALLY sure you know what you're doing.

-t
     
Kingmeyya  (op)
Fresh-Faced Recruit
Join Date: May 2010
Status: Offline
Reply With Quote
May 7, 2010, 01:12 AM
 
Originally Posted by sudowork View Post
Maybe it's just a typo, but put a space between 'sudo' and '-s'. Alternatively use 'sudo su'.
If that doesn't work, then try this '/usr/bin/sudo -s'. If that works, then your PATH is wrong. Type $PATH and make sure that '/usr/bin' is part of it.
If that doesn't work, then make sure 'sudo' is actually in '/usr/bin'. Type 'ls /usr/bin/sudo' and make sure it echoes it back. If not, it will say No such file or directory.
Thanks man it really only was a typo.
     
sudowork
Fresh-Faced Recruit
Join Date: Apr 2010
Status: Offline
Reply With Quote
May 7, 2010, 03:24 AM
 
Definitely good to hear. I would read up more on terminal commands. Also, the manual pages are a great resource. Type 'man sudo' for more info on sudo. Also, keep in mind that most commands are formatted as:
Code:
'COMMAND [OPTIONS] ARGUMENTS'
Some are more complicated, and some flags require arguments, but that's the gist of it. Note the spaces between the command and options and arguments.
sudo work
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 10:18 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,