Using the kill command on Linux.

Killing rogue programs in Linux The kill command included by default with the Linux suite of commands may be used to terminate a process by passing kill a process ID (PID). By default, kill just tells the process to die, but if the process has made previous arrangements with the…

Read More

Very useful and obscure computing tips.

A disturbing amount of people do not know you can reopen your last tab in the Firefox browser with Control+Shift+T. If you use Windows you can drag and snap windows so you can work on stuff side by side. Apparently, pressing F5 on notepad.exe adds a timestamp to the current…

Read More

Useful tips for running a website in 2021.

Running a website in 2021 is easy, but there are many things to remember. For one, ensure that all bills are paid automatically. It is very embarrassing when your SSL certificate expires and everyone can see your incompetence. Paying these bills on time is important. Having fast web hosting and…

Read More

Very useful Linux tips and tricks.

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…

Read More

Some very useful Linux tips and tricks.

To read a file from the Internet using wget and print it in the terminal, use this command. ┌─[jason@jason-desktop]─[~/Documents] └──╼ $wget -qO – https://i.mjh.nz/au/Brisbane/raw-tv.m3u8┌─[jason@jason-desktop]─[~/Documents] └──╼ $wget -qO – https://i.mjh.nz/au/Brisbane/raw-tv.m3u8 View an image from the Internet with wget and the ImageMagik display utility. ┌─[jason@jason-desktop]─[~/Documents] └──╼ $wget -qO – https://i.4cdn.org/g/1603231784644.png | display┌─[jason@jason-desktop]─[~/Documents]…

Read More

Very useful Ubuntu tips.

To get a nice warm screen color instead of a glaring white screen at night, use this very useful program. Redshift will remove blue light from your computer screen and then this will help with sleep. ┌─[jason@jason-desktop]─[/] └──╼ $sudo apt install redshift-gtk┌─[jason@jason-desktop]─[/] └──╼ $sudo apt install redshift-gtk Start Redshift from…

Read More

Some very old but still useful tips for Linux users.

Run the urxvt terminal as a transparent colored terminal window. This is very useful indeed. urxvt -fn "fixed" +sr +st -fg "#FFFFFF" -bg "#000033" -bd "#302c64" \ -ip +sb -title "*-Home-${HOME}-Shell-${SHELL}-Display-${DISPLAY}*" \ -tint DarkSlateGrey -fade 50 -fadecolor redurxvt -fn "fixed" +sr +st -fg "#FFFFFF" -bg "#000033" -bd "#302c64" \ -ip…

Read More

Very useful bash shell tips for Ubuntu.

There are some tips for Ubuntu that are not as well known as they should be. One tip is searching the bash history. Press Control-R and a prompt will appear. (reverse-i-search)`sudo’: sudo apt-get install libxml2-utils(reverse-i-search)`sudo’: sudo apt-get install libxml2-utils Type a search like “sudo” for example, and the first search…

Read More

Very nice bash shell prompt and other useful Linux information.

Very nice bash shell prompt This is a very useful Linux shell prompt with color. export PS1="\[\033[38;5;165m\]\d\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;51m\]\W\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;84m\]\H\[$(tput sgr0)\]@\[$(tput sgr0)\]\[\033[38;5;229m\]\u\[$(tput sgr0)\]:\l>\[$(tput sgr0)\]\[\033[38;5;231m\]\\$\[$(tput sgr0)\] "export PS1="\[\033[38;5;165m\]\d\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;51m\]\W\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;84m\]\H\[$(tput sgr0)\]@\[$(tput sgr0)\]\[\033[38;5;229m\]\u\[$(tput sgr0)\]:\l>\[$(tput sgr0)\]\[\033[38;5;231m\]\\$\[$(tput sgr0)\] " This prompt will look like this. Mon Mar…

Read More

Various useful tips for using Ubuntu.

How to check the installed Ubuntu version with the command line. Use this command to check the installed version of the Ubuntu distribution. 4.4 Sat Mar 07 jason@Yog-Sothoth 0: $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS"4.4 Sat Mar 07 jason@Yog-Sothoth 0: $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu…

Read More

Very useful bash awk scripting tricks.

Awk and bash are a very good combination for extracting certain text strings from a text file or the output of a program. Here I am extracting only the values that are surrounded by square brackets. 4.4 Mon Jan 27 jason@Yog-Sothoth 0: $ lspci | awk -vRS="]" -vFS="[" ‘{print $2}’…

Read More

Some very useful VIM tricks for the Linux/UNIX user.

VIM is a very useful and versatile editor for Linux. This is how to use it to its full potential. Some great VIM tricks to help for a Linux user or programmer. To read the output of a command into a text file, use the :r command in the command…

Read More

Very useful Linux shell tips and tricks.

Add a new directory to the PATH to allow running an application from it without typing the full path every time you wish to run it. PATH=$PATH:/usr/local/binPATH=$PATH:/usr/local/bin Or you may have something like this in your .bashrc to add this every time you log in. PATH="/home/jason/perl5/bin${PATH:+:${PATH}}"; export PATH;PATH="/home/jason/perl5/bin${PATH:+:${PATH}}"; export PATH;…

Read More

Linux security considerations to lock down a shared server.

SSH keysVirtual Private NetworkUse sudo instead of suVulnerability updatesLogin failure delayIptablesPasswords Securing a Linux server is very important. There are many attacks against UNIX servers and the security of corporate networks must be protected by many layered security devices and comprehensive security plans to deal with any problems experienced by…

Read More

Use sed to filter text, this is very useful.

This sed sample will filter out all HTML opening and closing tags in HTML sed -e ‘s/<[^>]*>//g’ blog.txtsed -e ‘s/<[^>]*>//g’ blog.txt This is an example of the usage of this one-liner. 4.4 Sun Nov 11 jason@Yog-Sothoth 0: $ sed -e ‘s/<[^>]*>//g’ index.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">…

Read More

Tcsh tricks and tips.

Print a lost of information about your current terminal using the tcsh shell and a nice command. Yog-Sothoth:~> telltc   Tcsh thinks your terminal has the following characteristics:   It has 217 columns and 55 lines It has a meta key It can not use tabs It has automatic margins…

Read More

Interesting one-liner to batch rename files.

This is a very interesting one-liner. This will batch rename files according to wildcards. jason@Yog-Sothoth » Pictures » $ for i in *.png; do mv -vi — "${i}" "$(date +%s%3N).${i#*.}"; done This renames files with a filename generated using the UNIX epoch. I guess this could be useful to someone…

Read More