Language Selection

English French German Italian Portuguese Spanish

Change Prompt Color when logged in as Root

Filed under

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

Today and Yesterday in Techrights

Plasma 5.8.2, Applications 16.08.2 and Frameworks 5.27.0 available in Chakra

The latest updates for KDE's Plasma, Applications and Frameworks series are now available to all Chakra users. The Plasma 5.8.2 release provides additional bugfixes to the many new features and changes that were introduced in 5.8.0 aimed at enhancing users' experience: Read more

Yocto driven camera design taps octa-core Snapdragon

Qualcomm and Thundercomm unveiled a Linux-supported, 4K camera reference design with an octa-core Snapdragon 625 and video analytics software. Qualcomm and hardware partner Thundercomm Technology announced an IP Connected Camera reference design called the Snapdragon 625 IP Camera built around its 14nm-fabricated, octa-core Cortex-A53 Snapdragon 625 system-on-chip. This is Qualcomm’s first Connected Camera design to support Linux instead of Android. Read more