Tag Archives: linux

Unix / Linux: Include Header in Grep Result

unix linux

Objective: Always include the header line when using grep. In other words, do not perform pattern matching on the header, but only perform pattern matching on the body (from line 2 onwards).

Linux: Get Kernel Version

unix linux

Objective: Find out the kernel version / release that is currently running on any Linux distribution.

Linux: Run Last Command as Sudo

unix linux

Objective: You wanted to run a command as root but you forgot to use sudo. There is a useful shell shortcut (using Event Designators) to re-run the previous command under sudo.

Linux: Alias with Variables / Arguments

unix linux

Objective: The alias command can be used to launch any command or a group of commands (inclusive of any options, arguments and redirection) by entering a pre-set string. But how to pass an argument to alias or let an alias handle a variable?