Any UNIX experts?

UKworkshop.co.uk

Help Support UKworkshop.co.uk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

RogerS

Established Member
Joined
20 Feb 2004
Messages
17,921
Reaction score
276
Location
In the eternally wet North
I want to alter the default settings on my Mac so that when I save images using programs like Preview, it defaults to jpg. I have the commands to do this but my applications are at the root level. So using Terminal, how do I get to work at the root level?

TIA
 
Hi Roger,

Try:

Code:
sudo su -
or

Code:
sudo bash
You'll be prompted for your password (not root's).

EDIT: now that I just re-read your post :mrgreen: I am not sure what you mean by root level. If you want to be root (super user), the above applies. Otherwise, if you want to go to the root of the file system, you need to:
Code:
cd /
or invoke your application using an absolute path, such as:
Code:
/Applications/Mail.app
. Note that the TAB key will auto-complete paths, which is quite handy.
 
If I remember correctly:

Code:
prompt>su root [return]
prompt>password: [your root password here][return]
prompt root>_

Macs don't have the root account enabled as an actual user account by default. su means "switch user". If you need to work as root, there's a utility for changing (in other words, enabling) the root account password on the setup DVD. I don't know how you do it on machines without DVD drives. I think if root password isn't set, it won't ask you, just switch to root.

You may need the correct permissions on the scripts (if you're adding executable scripts):
For this use chmod ("change mode").
To see the existing permissions on a file, use ls -l. That's "list (files) in long format".
You might need ls -a (-a means "attributes").
The permissions are Read, Write and eXecute. The three occurrences are for the three classes of UNIX user: (in order) file_owner, owner's_user_group, everyone else. You can use chmod to add execute to the permissions.

There are UNIX man pages (Windows' "help" equivalent) on Apples, but they're incomplete. The basic stuff is there though. at the prompt, type man chmod or man su or man ls for more nerdy stuff than one mind can resonably cope with. If it scrolls through too fast, you can use more, as in
Code:
prompt>more man ls

Hope that makes sense, but I'm somewhat rusty these days, and our youngest Mac is running 10.5!

E.
 
Thanks guys.

Gui...sudo bash worked fine.

Unfortunately the string I had doesn't affect Previews default image setting, I now discover. Ah well...
 
Back
Top