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

SUSE Leftovers

  • openSUSE Heroes meeting, day 2
    After a long, but exciting first day, we even managed to get some sleep before we started again and discussed the whole morning about our policies and other stuff that is now updated in the openSUSE wiki. After that, we went out for a nice lunch…
  • Installing Tumbleweed, November 2016
    The Tumbleweed system that I already have installed had desktops KDE, Gnome, XFCE and LXDE. But for recent intstalls (as with Leap 42.2), I have been going with KDE, Gnome, XFCE, LXQt, FVWM and MATE. So it seemed reasonable for the new Tumbleweed install to follow the same path. I also added Enlightenment for experimenting.

Android Leftovers

Linux Graphics

  • LibRetro's Vulkan PlayStation PSX Renderer Released
    A few days back I wrote about a Vulkan renderer for a PlayStation emulator being worked on and now the code to that Vulkan renderer is publicly available. For those wanting to relive some PlayStation One games this week or just looking for a new test case for Vulkan drivers, the Vulkan renderer for the LibRetro Beetle/Mednafen PSX emulator is now available, months after the LibRetro folks made a Vulkan renderer for the Nintendo 64 emulator.
  • Etnaviv DRM Updates Submitted For Linux 4.10
    The Etnaviv DRM-Next pull request is not nearly as exciting as MSM getting Adreno 500 series support, a lot of Intel changes, or the numerous AMDGPU changes, but it's not bad either for a community-driven, reverse-engineered DRM driver for the Vivante graphics cores.
  • Mesa 12.0.4 Being Prepped For Ubuntu 16.10/16.04
    Ubuntu is preparing Mesa 12.0.4 for Ubuntu Xenial and Yakkety users. It's not as great as Mesa 13, but at least there are some important fixes back-ported. Mesa 12.0.4 is exciting for dozens of bug fixes, including the work to offer better RadeonSI performance. But with Mesa 12.0.4 you don't have the RADV Vulkan driver, OpenGL 4.5, or the other exciting Mesa 13 work.

Games for GNU/Linux