Useful Linux CLI commands

Some of these are pretty basic and some are a bit more advanced and/or obscure in my opinion. I hope they are also useful to others out there. Please not that files names and file paths are just made up examples and might not fit what you are attempting to accomplish.

  • cd – change directory
  • Carl + c – cancels the currently running foreground operation
  • pod – s/how your current fill file path
  • cp /path/to/file.txt /path/to/your/new/file.txt – copy a file from one location to another location
  • move (rename) a file from one location to another location – mv file1.txt file1.back.txt
  • show the tail end of a file with any new additions that are written to the file – tail -f /var/log/messages.log
  • determine if a node is online – ping
  • determine the network route to a given node – trace route
  • perform a DNS lookup on a given address – nslookup
  •  show xx number of lines at the tail end of a file – Show the tail end of a file with any additions – tail -f /var/log/messages
  • run a shell script – bash OR sh
  • check drive mappings for the currently mounted file system – do -h
  • change to another system user – su username
  • easy way to change to the root user if you have sudo level access – sudo -i

How to Find Out What Version of Linux You Are Running

---------- On Red Hat Linux ---------- 
$ cat /etc/redhat-release

---------- On CentOS Linux ---------- 
$ cat /etc/centos-release

---------- On Fedora Linux ---------- 
$ cat /etc/fedora-release

---------- On Debian Linux ---------- 
$ cat /etc/debian_version

---------- On Ubuntu and Linux Mint ---------- 
$ cat /etc/lsb-release

---------- On Gentoo Linux ---------- 
$ cat /etc/gentoo-release

---------- On SuSE Linux ---------- 
$ cat /etc/SuSE-release

AS you can see this various depending on on which form of the original Linux Operating System so I usually end up searching for this as it is not something that I use day to day in my professional or work life. I hope it makes somees’s day that much easier. 🙂

Increase the Docker image size for UNRAID

I keep having to look this up so I might as well save myself some time. 😉

  • From the UNRAID Web UI stop the RAID array under Main > Array Options > Stop Array.
  • When the UI reloaded go to Settings > Docker.
    • You should now be able to change the size of the array in GB.
  • Click the Save button.
  • Start the RAID array back up.