Some interesting and useful Linux commands and BASH tricks.

A useful awk implementation to count the number of entries in the /etc/passwd file. john@deusexmachina:~$ sudo awk -F: ‘{ print $1 }’ /etc/passwd | wc -l 34john@deusexmachina:~$ sudo awk -F: ‘{ print $1 }’ /etc/passwd | wc -l 34 And the quintessential “Hello World” in Awk. john@deusexmachina:~$ awk ‘BEGIN { printf "%s, %s\n", "Hello", "World!" … Read more

How to edit user accounts on Linux Mint with the usermod command.

The usermod command offers the Linux user the ability to edit user accounts or lock out a user as well as changing the users login shell. Here I am editing the comment about the user “hoshi”. adeptus-mechanicus ~ # usermod -c "New user" hoshiadeptus-mechanicus ~ # usermod -c "New user" hoshi This command parameter changes … Read more