background preloader

Non-Windows OS

Facebook Twitter

How to: Change / Setup bash custom prompt (PS1) So how do you setup, change and pimp out Linux / UNIX shell prompt?

How to: Change / Setup bash custom prompt (PS1)

Most of us work with a shell prompt. By default most Linux distro displays hostname and current working directory. You can easily customize your prompt to display information important to you. You change look and feel by adding colors. In this small howto I will explain howto setup: a] Howto customizing a bash shell to get a good looking prompt b] Configure the appearance of the terminal. c] Apply themes using bashish d] Howto pimp out your shell prompt Prompt is control via a special shell variable. PS1 – The value of this parameter is expanded (see PROMPTING below) and used as the primary prompt string. How do I display current prompt setting? Simply use echo command, enter: $ echo $PS1 Output: \\u@\h \\W]\\$ How do I modify or change the prompt?

Modifying the prompt is easy task. Life After Coffee » Customize your bash prompt. If you’re like me you always intend to customize your UNIX or Linux prompt but never seem to find the time to look up the options and make the change.

Life After Coffee » Customize your bash prompt

Well, to give you a jump start here’s an excerpt from my book Easy Linux Commands. In order to eliminate the need to frequently issue the pwd command to determine the current working directory, many Linux users choose to display the working directory within the Linux command prompt. Some Linux administrators even provide this service for their users when they create their Linux accounts.

If a user’s command prompt does not contain the working directory, the command prompt can be modified by changing the prompt string 1 (PS1) shell variable as demonstrated here: $ PS1="[\u@\h \w]\\$ " [tclark@appsvr /home/tclark]$ This example of setting the PS1 variable also adds the username (\u) and hostname (\h) to the prompt.

Export PS1="[\u@\h \w]\\$ " Note: Files that begin with a period will not appear when you list the contents of a directory. How to Install AirPrint to Enable Wireless Printing on Windows? iOS 4.2 comes with a unique feature called AirPrint which allows you to print your documents, photos, emails and web-pages over a Wifi connection with your Apple iOS device.

How to Install AirPrint to Enable Wireless Printing on Windows?

To enable iOS 4.2 AirPrint Service on Windows, follow the step-by-step guide below. This guide is applicable to Windows 7, Windows Vista and Windows XP users. Prerequisites: iTunes 10.1Make sure the printer is setup as a shared printer on your local PCMake sure you have full administrator privileges to enable/disable services on your PC Steps to Enable AirPrint Service on Windows 7/Vista/XP: If you have 64-bit Windows OS, go to C:\Program Files (x86) and create a new folder called AirPrint as shown in the screenshot below: If you have 32-bit Windows OS, go to C:\Program Files and create a new folder called AirPrint as shown in the screenshot below: Download AirPrint.zip from here (Mirror) and unzip it in the AirPrint folder you created in the above steps. For 64-bit Windows OS: Software download selections. Iphone4 - Advanced iOS 4 Programming: Developing Mobile Applications for Apple iPhone, iPad, and iPod touch.

Editorial Reviews Product Description With Advanced iOS 4 Programming, developers have the expert guidance they need to create amazing applications for Apple's iPhone, iPad, and iPod touch.

iphone4 - Advanced iOS 4 Programming: Developing Mobile Applications for Apple iPhone, iPad, and iPod touch

Inside, veteran mobile developer Dr. Maher Ali begins with a foundation introduction to Objective C and Cocoa Touch programming, and then guides readers through building apps with Apple's iPhone SDK 4 – including coverage of the major categories of new APIs and building apps for the new Apple iPad. This book concentrates on illustrating GUI concepts programmatically, allowing readers to fully appreciate the complete picture of iOS 4 development without relying on Interface Builder.

In addition, Interface Builder is covered in several chapters. Advanced iOS 4 Programming delves into more advanced topics going beyond the basics of iOS 4 development, providing comprehensive coverage that will help you get your apps to the App Store quicker. Key features include: