It is very easy to create a loopback filesystem in your home directory. This can be used to store files, or can be enabled as a swap partition. Firstly, run this command to create a blank file-system image. This will be 524 megabytes. [email protected]:~/Documents$ dd if=/dev/zero of=myimage.img bs=1024 [email protected]:~/Documents$ dd if=/dev/zero of=myimage.img bs=1024 count=524288 Now …

Get a comprehensive listing of all Arch Linux pacman mirrors. curl -s -L "https://www.archlinux.org/mirrorlist/?country=all&protocol=https&use_mirror_status=on" 2>&1 | sed ‘s/^.//’ > mirrorlistcurl -s -L "https://www.archlinux.org/mirrorlist/?country=all&protocol=https&use_mirror_status=on" 2>&1 | sed ‘s/^.//’ > mirrorlist A simple script to update your mirror listing on your Arch Linux system. #!/bin/bash echo "Fetching new sorted mirrorlist…" curl -s -L "https://www.archlinux.org/mirrorlist/?country=all&protocol=https&use_mirror_status=on" 2>&1 | sed …

It is very simple to show a banner to your users, that explains the terms of use for an SSH connection upon the user reaching a login prompt. Firstly, create a file named info in the /etc/ssh directory. sudo touch /etc/ssh/infosudo touch /etc/ssh/info Then put this in it. *************************************************************************** NOTICE TO USERS     This …

To encode a section of a movie file to a high-quality webm file, use this simple addon for mpv. Firstly run this command to create a directory to put the lua script. mkdir -p ~/.config/mpv/scriptsmkdir -p ~/.config/mpv/scripts Then download the required script to the directory we created. wget -O ~/.config/mpv/scripts/webm.lua https://raw.githubusercontent.com/ElegantMonkey/mpv-webm/master/build/webm.luawget -O ~/.config/mpv/scripts/webm.lua https://raw.githubusercontent.com/ElegantMonkey/mpv-webm/master/build/webm.lua Once …

To get proper directory indexing setup in a directory in your Apache web server configuration, firstly, create a .htaccess file and paste the code below into it. Options +Indexes   HeaderName HEADER.html ReadmeName FOOTER.html   IndexIgnore .htaccess .??* *~ *# HEADER* FOOTER* README* RCS CVS *,v *,t *.incOptions +Indexes HeaderName HEADER.html ReadmeName FOOTER.html IndexIgnore .htaccess …

There are a lot of obscure shell tricks for the bash shell that are useful for showing off shell tricks and making your shell usage easier. For a first example, run this command. ubuntu ~ $ ls -hulaubuntu ~ $ ls -hula Then run this and the previous command parameters will be applied again. ubuntu …

Getting a lot of useful information about a hard disk drive is easy with Linux. The smartmontools package contains utilities to retrieve a lot of very useful info. Firstly, install this package. [email protected]:~$ sudo apt install [email protected]:~$ sudo apt install smartmontools Then run the command with sudo to get info about a drive. [email protected]:~$ sudo …

Nice Linux themes and wallpapers Some more lovely GTK themes and wallpapers for your new Linux desktop in 2018. Gnome Shell themes Human Next: https://www.gnome-look.org/p/1188270/. Maxim: https://www.gnome-look.org/p/1182550/. Copernico: https://www.gnome-look.org/p/1013056/. Wallpapers for Gnome and MATE Railway line through the mountains: https://alpha.wallhaven.cc/wallpaper/22805. Looking down on a swimming pool beside the ocean: https://alpha.wallhaven.cc/wallpaper/575741. Lake in the Rocky Mountains: …

Getting detailed information about a window on your Linux desktop is very easy. The Xwininfo command is very useful for getting this information. Run the command and then click a window to get detailed information about a window. [email protected]:~$ [email protected]:~$ xwininfo Absolute upper-left X: 498 Absolute upper-left Y: 47 Relative upper-left X: 4 Relative upper-left …

The Linux command line may be used to get information about a video file easily. Here is an example. Getting the video resolution with a simple command. [email protected]:~/Videos$ ffprobe -v quiet -print_format json -show_format -show_streams burnout-in-a-town-street.mp4 | grep coded "coded_width": 400, "coded_height": 224,[email protected]:~/Videos$ ffprobe -v quiet -print_format json -show_format -show_streams burnout-in-a-town-street.mp4 | grep coded "coded_width": …

Importing a WordPress database dump into MySQL is very easy, I downloaded a very old backup of my old website, and I wanted to see what was in it. So I installed MySQL and then I had to create the database. mysql> CREATE DATABASE bejiitas_wrath;mysql> CREATE DATABASE bejiitas_wrath; This was necessary, as importing the database …

The mpv movie player can play a directory of movies randomly, this is useful if the user wants movies playing randomly in the background. Do it like this. mpv –shuffle /media/jason/Seagate\ Backup\ Plus\ Drive/Movies/**mpv –shuffle /media/jason/Seagate\ Backup\ Plus\ Drive/Movies/** This is the result, a randomly chosen movie from your collection. This is how to do …