Language Selection

English French German Italian Portuguese Spanish

Change Prompt Color when logged in as Root

Filed under
HowTos

All security books will recommend you not to allow root SSH logins to your Linux machines. So most of us (administrators) commonly SSH with our regular user credentials and then use "su" to escalate our privileges in order to perform root tasks. If you do this frequently, sometimes it gets a little confusing to make out if you are currently root or regular user. To determine your current status you probably you end up looking at your prompt or type in "whoami".

In this article, I will show you how to change the color of your prompt when you escalate your privileges to a super-user. This technique is a good way to remind yourself that you are holding high privileges (so don’t do anything stupid). This tip is for administrator’s convenience and helps out more if you are managing large number of Linux servers.

Step 1: Login and escalate your privileges to a Super-User

I have a regular user account (username=param) on a Linux server. So in this step, I simply login to the server and then used “su” command to escalate my privileges to a Super-User.

Full Story.

More in Tux Machines

Open-Source Chat Platform Scrollback Raises $400,000 Seed Round

Scrollback, a free open-source chat platform for online communities, has raised $500,000 Singaporean dollars (about $400,000) led by Jungle Ventures, with participation from Singapore’s National Research Foundation, Crystal Horse Investments, Singapore Angel Network, Roland Turner, and other angel investors. Read more

An open source Christmas with Kano

So this season, what every open sourc-erer wants might just be Kano, a computer kit that comes will all the functions needed to build it and learn to code afterwards. Read more

Particulate sensor developed using open source approach

A New York based start up company has used an open source approach, as well as funding from Kickstarter, to develop AirBeam – a handheld sensor which determines the concentration of particles in the air measuring 2.5µm or less. [...] The AirCasting app and website code is available on GitHub as open source, along with the AirBeam firmware and electronic schematics. The STL files for 3D printing the AirBeam and LiteBeam enclosures can be downloaded from www.shapeways.com. Read more

Brocade relying on open source and 'natural tension' for growth

In line with this prediction, Brocade has been working towards changing its business tactics from being known as a hardware enterprise storage provider to also becoming an additional player in the software-defined network market — one in which rival Cisco has also been dipping its toes. Read more