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 …

A nice shell prompt that is randomly generated each time it appears. _() { shuf -n 1 /usr/share/dict/words | sed "s/’s$//; s/.*/\l&/"; }; PS1="\[\e[1;31m\]$(_)\[\e[m\]@\[\e[1;35m\]$(_)\[\e[m\]\$ "_() { shuf -n 1 /usr/share/dict/words | sed "s/’s$//; s/.*/\l&/"; }; PS1="\[\e[1;31m\]$(_)\[\e[m\]@\[\e[1;35m\]$(_)\[\e[m\]\$ " Select a random word from a textfile with bash. ubuntu ~ $ shuf -n 1 /usr/share/dict/words pluckedubuntu ~ …

Using wild-cards to display various files in a folder with ls. I recently needed to check whether certain files were in the /usr/lib folder and I used the ls command to do this. to find all files related to the Perl programming language in the /usr/lib directory. ubuntu ~ $ ls /usr/lib/*perl* /usr/lib/libperl.so.5.18 /usr/lib/libperl.so.5.18.2   …

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": …

This bash alias will take a directory name or path as an argument. alias goto=’cd $1’alias goto=’cd $1′ This is an example of how this alias works. [email protected]:~$ goto /usr/share [email protected]:/usr/[email protected]:~$ goto /usr/share [email protected]:/usr/share$ This is a very neat bash trick. This might not work if the directory name uses spaces though. Generate a very …

A network speedtest is a good way to get a picture of how fast your Internet connection really is. To perform a speedtest in Ubuntu, first install pip using this command. sudo apt-get install python-pipsudo apt-get install python-pip Then install speedtest-cli. [email protected]:~$ sudo pip install speedtest-cli Downloading/unpacking speedtest-cli Downloading speedtest-cli-0.3.1.tar.gz Running setup.py (path:/tmp/pip_build_root/speedtest-cli/setup.py) egg_info for …

The Linux command-line offers many useful methods of creating many folders on your computer at once.  This command will create a few folders on your system named one,two,three,four and create the folders five,six,seven,eight within each folder created. ~$ mkdir -p {one,two,three,four}/five/six/seven/eight~$ mkdir -p {one,two,three,four}/five/six/seven/eight This command will create four folders named one,two,three,four and put the …

The exif command for Linux allows a user to get exif information from a camera image. This example below shows the sample output from this command. ─[[email protected]]─[~/Desktop] └──╼ $exif waterfall.jpg EXIF tags in ‘waterfall.jpg’ (’Intel’ byte order): ——————–+———————————————————- Tag |Value ——————–+———————————————————- Manufacturer |SAMSUNG Model |SM-N9005 Orientation |Top-left X-Resolution |72 Y-Resolution |72 Resolution Unit |Inch Software …