How to Change Your Default Terminal Prompt in Mac OS X Lion
Posted on January 27, 2012 by Mazur. This entry was posted in Tutorial. Bookmark the permalink.
By default, when you open up a new Terminal window in Mac OS X the command prompt displays a relatively long name:
I prefer to shorten this to a simple dollar sign ($) in order to free up space.
To change your default command line prompt, follow these instructions:
1) Navigate to your home directory:
2) Create a file called
3) Add the following line (press
export PS1="$ "
4) Save the file (press
5) Restart Terminal
You should now see something like this:
There are other ways you can configure the command prompt (for example, showing the current time), but I prefer to keep it simple.
How to Add Terminal Aliases in Mac OS X LionIn “Tutorial”
Macs: Productivity made EasyIn “Programming”
How to reset a users password from single user mode.
How to enable the root user
OS X Lion (10.7) and later
1.From the Apple menu choose System Preferences.
2.From the View menu choose Users & Groups.
3.Click the lock and authenticate as an administrator account.
4.Click Login Options.
5.Click the "Edit" or "Join" button at the bottom right.
6.Click the "Open Directory Utility" button.
7.Click the lock in the Directory Utility window.
8.Enter an administrator account name and password, then click OK.
9.Choose Enable Root User from the Edit menu.
10.Enter the root password you wish to use in both the Password and Verify fields, then click OK.
OS X, Apple
- From the Apple menu choose System Preferences….
- From the View menu choose Users & Groups.
- Click the lock and authenticate as an administrator account.
- Click Login Options….
- Click the “Edit…” or “Join…” button at the bottom right.
- Click the “Open Directory Utility…” button.
- Click the lock in the Directory Utility window.
- Enter an administrator account name and password, then click OK.
- Choose Enable Root User from the Edit menu.
- Enter the root password you wish to use in both the Password and Verify fields, then click OK.
- Or from Terminal when logged in as an admin user –
dsenableroot to enable,
dsenableroot -d to disable