Installing Ubuntu is a lot of fun. Some helpful tips.
Some very useful tips and tricks for using Ubuntu on the desktop.
Some very useful tips and tricks for using Ubuntu on the desktop.
A couple of very interesting Linux commands.
Some very useful tricks for downloading videos from Youtube and using MPV.
How to use SFTP to connect to a remote Linux machine and then transfer files easily. This is a great way to send and receive files over a Linux network.
Some very useful tips for dpkg and apt on your Debian system. How to unpack a Debian package and other useful tips.
Some useful Bash shell tricks There are a lot of obscure Bash shell tricks for the Linux shell that is 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 … Read more
Some very useful grep tips for a UNIX or Linux user This is a very useful example, this is how to stop grep finding letters before the start of the search term “file*[s-t]”. The \b operator is an end of word marker. ┌──[[email protected]]─[~] └──╼ ╼ $ grep -n "\bfile*[s-t]\b" /usr/share/dict/words 46437:files 46438:filet 46439:filet’s┌──[[email protected]]─[~] └──╼ ╼ … Read more
This is an interesting command to view your command history when you are using Bash. ┌──[[email protected]]─[~] └──╼ ╼ $ hash hits command 1 /usr/bin/gethostip 1 /usr/bin/sudo┌──[[email protected]]─[~] └──╼ ╼ $ hash hits command 1 /usr/bin/gethostip 1 /usr/bin/sudo This command is a Bash shell built-in command. If you are using the tcsh or zsh shells; this command … Read more
Some interesting and useful Linux shell commands Linux has some very useful and interesting commands available to the Linux desktop user to find out information about your computer system. Some of these hearken back to the days of the old Linux terminals; when you accessed your computer from a dumb terminal instead of a graphical … Read more
There are quite a few interesting command-line tricks for Windows. Create a folder named CON. This is quite difficult to delete. echo "hello" > \\.\C:\Users\shawn\Documents\CONecho "hello" > \\.\C:\Users\shawn\Documents\CON Another interesting trick is one. C:\Users\Dyatlov\Downloads\testing>echo "" > ….::$INDEX_ALLOCATION The system cannot find the file specified.C:\Users\Dyatlov\Downloads\testing>echo "" > ….::$INDEX_ALLOCATION The system cannot find the file specified. This … Read more
I have found a very nice trick to switch back and forth between directories in Linux. This is very useful if the user needs to do something in one directory and then switch back to the previous directory to do something else. Below is a very useful example. I cd from ~ to the Documents … Read more
There are many very useful shell tricks when using the bash shell on Linux or UNIX. Print the last used command-line arguments with a keyboard shortcut. ESC-. This will print the last used command-line arguments to the prompt. Very useful if it is a very long one-liner. Print a listing of your most-used commands and … Read more
To recall the last entered command on the Linux console, press the Ctrl-P key shortcut. You may also press the up arrow to recall the command, but the Ctrl-P shortcut is another good way to perform this feat. The CTRL-A shortcut will jump to the beginning of the line you are currently typing and CTRL-E … Read more
The ps command lists all running processes on your Linux machine, this is how to fine-tune this and search for certain processes using wildcards. Use this example command line to find all Apache HTTP server instances. ps -ef | grep -i apache*ps -ef | grep -i apache* This is the output a user will get … Read more
Align all text right on an 80 column width. jason@jason-Lenovo-H50-55:~/Documents$ ls -hula | sed -e :a -e ‘s/^.\{1,80\}$/ &/;ta’ total 872K drwxr-xr-x 2 jason jason 4.0K May 4 08:48 . drwxr-xr-x 23 jason jason 4.0K May 3 20:51 .. -rw-r–r– 1 jason jason 848K Apr 21 13:01 altis_insurgency_altis.pbo -rwxrwxr-x 1 jason jason 166 Apr 22 … Read more
There are some very useful tricks that can be used to get information about packages installed on a Debian or Ubuntu machine. Here are just a few. Get a graphical view of the actual dependencies of a package such as Firefox. Firstly, install the graphviz package. jason@Yog-Sothoth:~$ sudo apt install graphvizjason@Yog-Sothoth:~$ sudo apt install graphviz … Read more
Reading a large text file and then finding all words that contain between 5 and 7 vowels. Notice I am not using cat. jason@Yog-Sothoth:~/Documents$ egrep ‘^([^aieou]*[aieou]){5,7}[^aieou]*$’ < pg768.txt | wc -l 284jason@Yog-Sothoth:~/Documents$ egrep ‘^([^aieou]*[aieou]){5,7}[^aieou]*$’ < pg768.txt | wc -l 284 Count the number of times a single word appears in a text file. jason@Yog-Sothoth:~/Documents$ egrep … Read more
A nice shell prompt that is randomly generated each time it appears. Working version. PS1="\[\e[1;31m\]$(shuf -n 1 /usr/share/dict/words)\[\e[m\]@\[\e[1;35m\]$(shuf -n 1 /usr/share/dict/words)\[\e[m\]\$ "PS1="\[\e[1;31m\]$(shuf -n 1 /usr/share/dict/words)\[\e[m\]@\[\e[1;35m\]$(shuf -n 1 /usr/share/dict/words)\[\e[m\]\$ " Select a random word from a textfile with bash. ubuntu ~ $ shuf -n 1 /usr/share/dict/words pluckedubuntu ~ $ shuf -n 1 /usr/share/dict/words plucked Select a … Read more
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 … Read more
Print the current date and time with Powershell. "{0:dddd – hh:mm:ss – d/M/yy}" -f (get-date)"{0:dddd – hh:mm:ss – d/M/yy}" -f (get-date) This is an example of what this will give you. PS C:\Users\jason> "{0:dddd – hh:mm:ss – d/M/yy}" -f (get-date) Tuesday – 08:42:05 – 30/1/18PS C:\Users\jason> "{0:dddd – hh:mm:ss – d/M/yy}" -f (get-date) Tuesday – … Read more