How to search the apt packages list for a certain package.

The apt command allows the user to search for a specific package. This is very useful if you do not know the exact name for package installation. This is one way. ubuntu ~ $ apt-cache search vimubuntu ~ $ apt-cache search vim This will return a long listing of all matching package names. This is … Read more

Get system information easily with screenfetch on Linux.

To easily get system information, install screenfetch on Linux and this will be easy. Install screenfetch. sudo apt install screenfetchsudo apt install screenfetch Then run it to get system information easily. This is a good way to show off your system specifications. jason$ screenfetch [[ ! ]] Gtk-Message: Failed to load module "topmenu-gtk-module" ./+o+- jason@jason-desktop … Read more

Useful Linux tips for the desktop.

This command will capture a screenshot of the desktop and save it to the home directory. jason@neo:~$ import -window root "$HOME/$(date ‘+%y%m%d_%T’).png"jason@neo:~$ import -window root "$HOME/$(date ‘+%y%m%d_%T’).png" This is how to do this with the scrot utility. jason@neo:~$ scrot Desktop-%H:%M:%S-%d-%m.jpgjason@neo:~$ scrot Desktop-%H:%M:%S-%d-%m.jpg Characters preceded by a ‘%’ are interpreted by strftime(2). See man strftime for … Read more

How to create a new user on Linux and add a password in one go.

The useradd command can create a new user on your Linux system. Here is how to add a password as well all in one simple operation. root@neo:/home/jason# useradd -m -s /bin/bash -g users -p $(openssl passwd -1 ff302) randycoleroot@neo:/home/jason# useradd -m -s /bin/bash -g users -p $(openssl passwd -1 ff302) randycole This is a good … Read more

Nice Linux prompts to liven up your terminal.

This is a nice script to build a custom PS1 that looks awesome and is simple too. export PROMPT_COMMAND=__prompt_command function __prompt_command() { local EXIT="$?"   local DEFAULT=’\[\e[0m\]’   local RED=’\[\e[0;31m\]’ local GREEN=’\[\e[0;32m\]’ local DARK_GRAY=’\[\e[0;90m\]’ local PURPLE=’\[\e[0;35m\]’ local YELLOW=’\[\e[0;33m\]’   PS1="\n${GREEN}\t${DEFAULT} "   if [ "$EXIT" != "0" ]; then PS1+="${RED}$EXIT${DEFAULT} " else PS1+="$EXIT${DEFAULT} " fi … Read more

Useful Linux ideas and tips. Print graphical notifications from a shell script.

To print a graphical notification from a shell script, insert this code. notify-send "Match Found!"notify-send "Match Found!" This will pop up a notification on your desktop, this will alert you to the fact that your shell script has done something. Make your computer talk. This will speak whatever you type as text. jason@jason-desktop:~$ espeak "I … Read more

Useful shell tips. How to search and replace characters or words with the bash shell.

Search and replace on the bash shell is very useful for various one-liner shell commands. The below example shows how to replace a # character with a * character. jason@DESKTOP-R72SPS3:/mnt/c/Users/johnc/Documents$ cat ip.c | sed ‘s/#/*/gi;’ *include <stdio.h>   int main() { printf(".");   return 0; }jason@DESKTOP-R72SPS3:/mnt/c/Users/johnc/Documents$ cat ip.c | sed ‘s/#/*/gi;’ *include <stdio.h> int main() … Read more

How to list all non-free Linux packages installed on Linux Mint 18.

To list all non-free Linux packages that are installed on your Linux Mint system, use this one-liner. This prints out a list of all non-free packages that are installed on a system. jason@jason-virtual-machine ~ $ dpkg-query -W -f ‘${Section}/${Package}\n’ | grep -E ‘^(contrib|multiverse|non-free|partner|restricted)/’ | sort contrib/kernel/virtualbox-guest-dkms contrib/misc/virtualbox-guest-utils contrib/x11/virtualbox-guest-x11jason@jason-virtual-machine ~ $ dpkg-query -W -f ‘${Section}/${Package}\n’ | … Read more

Linux just as important as ever in the modern world.

Windows 10 is the current operating system that Microsoft are pimping, but Linux is still very important. Servers run the free operating system, and there are many jobs that require Linux administration experience. The Windows 10 bash shell cannot run server software such as Apache and MySQL, this means that an actual Linux machine is … Read more

Generate an assortment of random passwords with a simple command.

Generate secure passwords for your user accounts The pwgen command will generate a set of random passwords that may be used to secure your user account. Type this command to install this utility. root@DESKTOP-R72SPS3:~# apt-get install pwgenroot@DESKTOP-R72SPS3:~# apt-get install pwgen Now we can generate a few passwords. jason@DESKTOP-R72SPS3:/mnt/c/Users/johnc$ pwgen -s -v 79lZrgzb ctklTCV3 zX3nDCQr FXk5g7V8 … Read more

Location of the filesystem that the Windows 10 bash shell uses.

Location of the Windows 10 bash shell files This is the location of the actual files that are installed when you install the Windows 10 bash shell. This means that it is not really a ext4 filesystem, but emulating this when you load it up in a CMD window. %localappdata%\lxss\rootfs%localappdata%\lxss\rootfs The location of the actual … Read more

Windows 10 bash shell not very impressive at all.

The new Windows 10 bash shell is not very impressive once you get it installed. I have tried it and I could not ping websites even though Microsoft Edge could access the Internet. It is possible to install packages if these lines are added to the /etc/hosts file. 91.189.91.14 archive.ubuntu.com 91.189.92.201 security.ubuntu.com91.189.91.14 archive.ubuntu.com 91.189.92.201 security.ubuntu.com … Read more

Windows 10 bash shell 10.0.14316 very good for getting system information.

The new bash shell in Windows 10 build 10.0.14316 is the best addition to Windows 10 yet. Here I am getting information about the CPU. root@localhost:/mnt/c/Users/johnc# cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 60 model name : Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz stepping : 3 microcode : … Read more