Linux One-liner To Find The Boot-mode: BIOS or UEFI?

With UEFI becoming the de-facto firmware for system initialization and BIOS mode being kept only for compatibility, Linux doesn't seem to have a straightforward way of determining the mode the OS is booted by. Here's a quick solution -- if UEFI, there exists a directory "/sys/firmware/efi". Otherwise, the booting mode would be legacy-BIOS.


Deepin Linux

Linux has given rise to a plethora of distributions (packaged full-fledged OS) empowering the core functionality of resource management, networking and security. What was once an unattractive, geek-only and terminally-nerdy OS has morphed into the mainstream desktop alternative for Windows and macOS. Much can be attributed to Ubuntu -- the first widely-embraced Linux OS by … Continue reading Deepin Linux

“cut” — A Soft Scissor For The Terminally Nerdy

cut -- the column extractor from a line of text might sound plain, but when combined with other text processing tools such as grep and sed, its role is anything but plain. Let's take a look at its elemental operations. Cut by Character Cutting specific characters from a line of text is achieved via the … Continue reading “cut” — A Soft Scissor For The Terminally Nerdy

“basename” — Tell Me The Last Bus Stop

Few commands exist in Linux (and other Unix-derivatives) for the sole reason of aiding scripting and writing one-liners. basename is one of the little-known commands in that pack (at least for me). Since working in Linux usually translates to working with files, basename becomes extremely handy when meandering long directory paths to access the files. … Continue reading “basename” — Tell Me The Last Bus Stop