ODOC: printenv

printenv – Print All/Part of Environment


printenv prints environment variables with its Name and Value.


$ printenv — Print all Env variables and its value.

$ printenv HOSTNAME — Print HOSTNAME value.

$ printenv SHELL TERM — Print SHELL and TERM values.

Read: man printenv
printenv, odoc, linux,gnu/linux

in ODOC | 50 Words

ODOC: setfont

setfont — Load EGA/VGA console screen font.


The setfont command reads a font file and loads it into the EGA/VGA character generator and optionally outputs the previous font. It can also load various mapping tables and output the previous versions. The standard Linux font format is the PSF (PC Screen Format) font.


$ setfont — Load the default font.

$ setfont -v — Load the default font with verbose output.

$ setfont iso01.14 — Load the iso01 font (size=8×14).

/lib/kbd/consolefonts – Default Dir for console fonts.
/lib/kbd/unimaps – Default Dir for Unicode maps.
/lib/kbd/consoletrans – Default Dir for screen mappings.

Read the ReadMe files available in the above locations to get more information about the font and maps.

TIP: Set your default console font in /etc/sysconfig/i18n file.

Read: man setfont
setfont, linux, odoc, gnu/linux

in ODOC | 146 Words

ODOC: locale

locale — Get and show the locale-specific information.


The locale program writes information about the current locale environment, or all locales, to screen. Locale is a set of local environment settings, which is used to describe the Language Encoding Standard, Date/Time format, Number format, Telephone Number format, Paper format, etc …


$ locale — Show the current locale settings.

$ locale -a — List currently available locale settings.

$ locale -m — List currently available character encodings.

$ locale -c LC_TIME — Show values of the LC_TIME.

$ locale -k LC_TIME — Show the Name and Value of the LC_TIME.

Read: man locale
locale, odoc, linux, gnu/linux

in ODOC | 109 Words

ODOC: od

od — Dump files in Octal and other formats.


od (Octal Dump) writes an unambiguous representation of the file in screen. Each line of output consists of the offset in the input, followed by groups of data from the file.


Create a 2 lines text file to test following examples.

$ od myfile — Dump the content and Offset in Octal format.

$ od -a myfile — Dump the content as named char.

$ od -b myfile — Dump the content in octal bytes.

$ od -c myfile — Dump the content in ASCII.

$ od -h myfile — Dump the content in Short Hex.

$ od -w6 myfile — Set output width to 6 Bytes. Default is 16.

$ od -j6 myfile — Skip initial 6 Bytes.

$ od -N6 myfile — Read only 6 Bytes.

$ od -Ad myfile — Show Offset values in decimal.

$ od -Ax myfile — Show Offset values in Hex.

$ od -An myfile — Don’t show the Offset.

Read: man od
od, odoc, linux, gnu/linux

in ODOC | 160 Words

ODOC: eject

eject — Eject the removable media


Eject allows removable media (like CD-ROM, Floppy, Tape, JAZ, ZIP) to be ejected under software control. The command can also control some multi-disc CD-ROM changers, the auto-eject feature supported by some devices, and close the disc tray of some CD-ROM drives.


$ eject — Eject the default device, mostly CD.

$ eject -v — Same as above and show more info.

$ eject /dev/cdrom — Eject CD using device file name.

$ eject -t — Close the drive tray.

$ eject -vt — Same as above and show more info.

Read: man eject
eject, linux, odoc, gnu/linux

in ODOC | 102 Words

ODOC: su

su — Run a shell with Substitute User


su allows one user to temporarily become another user. It runs a command with the Real & Effective user id, group id and supplemental groups of a given user. If user not given, it will login as root.


$ su — Run a new shell with root user.

$ su user1 — Run a new shell with user1.

$ su -c ls — Run the command with substitute user.

$ su -f user1 — Fast login (skips startup files).

$ su -p user1 — Preserve the environment variables.

$ su -l user1 — Unset all env variables, change Home dir and run shell startup files.

$ su -s /bin/csh — Run csh shell instead of the user’s default shell.

Read: man su
su, linux, odoc, gnu/linux

in ODOC | 130 Words

ODOC: colrm

colrm — Remove columns from a file.


colrm removes selected columns from the input. Input is taken from STDIN and Output is sent to STDOUT. Column numbering starts with 1.


$ ls -l | colrm 35 — Remove all columns after the 34th column.

$ ls -l | colrm 1 14 — Remove columns from 1 to 14.

Read: man colrm
colrm, linux, odoc, gnu/linux

in ODOC | 58 Words

ODOC: lsmod

lsmod — Show the status of loaded Linux Kernel Modules.


lsmod is a trivial program, which nicely formats the contents of the /proc/modules, showing what kernel modules are currently loaded.


$ lsmod -V — Print the version number.

$ lsmod — List all currently loaded Kernel Modules.

Read: man lsmod
lsmod, modules, kernel+modules, linux, gnu/linux

in ODOC | 58 Words

ODOC: lsusb

lsusb — List all USB devices


lsusb is a utility for displaying information about all USB buses in the system and all devices connected to them.


$ lsusb — List all USB device details in short form.

$ lsusb -v — List all USB device details in long form.

$ lsusb -vv — List all USB device details in very verbose form.

$ lsusb -t — Show USB device hierarchy as a tree.


  • lsusb will collect all USB device info from /proc/bus/usb
  • List of all known USB IDs are available in /usr/share/hwdata/usb.ids

Read: man lsusb
usb,lsusb, linux, odoc, gnu/linux

in ODOC | 106 Words

ODOC: lsdev

lsdev – Display information about installed hardware


lsdev gathers information about your computer’s installed hardware from the interrupts, ioports and dma files in the /proc directory, thus giving you a quick overview of which hardware uses what I/O addresses and what IRQ and DMA channels.
This program only shows the kernel’s idea of what hardware is present, not what’s actually physically available.


$ lsdev

Read: man lsdev
lsdev, odoc, linux, gnu/linux,kernel

in ODOC | 75 Words