-
Jobs & Apple Executives Speak on Location Tracking Issues
Recently, Apple product releases such as iPad 2 and the white iPhone 4 have been overshadowed in the news with negative leaning press…
-
White iPhone 4 Launching Tomorrow
Apple today announced that the long awaited, and highly fabled white iPhone 4 will finally be available for sale beginning tomorrow. Debuting nearly…
-
What Does 64-bit Mean to Me?
When Apple introduced the Power Mac G5 in 2003, it was touted as “The world’s first 64-bit personal computer.” This was due to…
-
Has Technology Gone Too Far?
Over the past week there has been a lot of press and talk about the latest feature, discovered by accident, of our beloved…
-
-
Terminal Tricks
Are you a command line junky? Or just a command line aficionado that would like to spiff up your terminal windows? If so, wonderful–you, my friend, should most definitely read on. In Mac OS X, the Terminal application provides the user with a multitude of customizable items.
To start, in Terminal Preferences, under the Settings tab, you have several preconfigured window settings from the classic “Pro” theme to “Red Sands” to the colorful “Grass” theme. Within each of these themes is the ability to customize several things such as Window and login Shell. Or, you can create your own theme.
For instance, you can change not only the color of your Terminal window text and cursor but also its opacity. This may seem like a minute adjustment that only affects the aesthetics of your interface, but these can come in very handy. For example, a semi-translucent window will allow you to see behind it, which is helpful if you want to ping an address you can’t remember and can’t copy.
You can also save window groups in different colors, sizes or different locations on the screen. This is a handy feature if you tend to run several commands simultaneously, usually in conjunction with each other. It’s very helpful if you want to use dscl to query a users network account info and then ping the users host server in another window. This is a common network account troubleshooting tactic, useful for resolving network home folder issues.
Here’s another primarily aesthetic adjustment for the more advanced Terminal user. (Note: If you are not entirely comfortable with the command line, I suggest that you not attempt this.) Your default command prompt displays the name of your computer followed by your user name. This command prompt can be edited as well. To do this you will first want to create your profile (.profile from the Terminal window) with your favorite text editor. I prefer vi, but you can use pico, nano or any other if you prefer.
Please note that the creation of the .profile file is designed to retain your settings for the next session. If you enter any of these commands as is they will invoke the same response, but will not be retained once you close the window. So if you would like to play around with the settings without keeping them permanently, just enter them directly from the command prompt.
Now enter in the following command
export PS1=” ”
This is the basic command that tells the Terminal what to show before the command prompt. What you would like to see for you customization can be added between the quotes. Aside from whatever unique word or phrase such as “Hello World” you can add in special characters that will invoke the following responses.
d — Current date
t — Current time
h — Host name
# — Command number
u — User name
W — Current working directory (e.g.: Desktop/)
w — Current working directory, full path (e.g.: /Users/Smalldog/Desktop)For example, if I typed in
export PS1=”Hello World! w u :”
Logged in as smalldog with my Desktop folder as my working directory, my command prompt would appear as follows:
Hello World! ~/Desktop smalldog :
There are many more customizations that can be done, but for now I will leave you with the Hello World! prompt. Happy modding.
