Born Again SHell

Linux BASH commands

Know what you need? Other than a million doll hairs. You need to check out the web site ExplainShell.com . Super useful resource for linux users which let’s you enter commands just like you would in BASH and it processes it for you. Instead of executing the commands, it explains to you in detail– based on the command’s help files– what the submitted / entered command will do!


List of Common Linux CLI Command Line expressions:

Linux CLI Commands. A practical reference at PixelBeat (remarked as “Comprehensive”)

CHMOD / CHOWN / CHGRP- Permissions and Ownership

Change permissions and ownership of all files in a directory, recursively using the following command:

sudo chmod -R ugo+rwx,o-w . --verbose && sudo chown -R newuser_name:newgroup_name . --verbose

I just discovered a really nice all around resource for Linux newbies, and advanced users alike. Check out the Linuxize page about CHMOD!

Linuxize is a Linux Sysadmin and DevOps blog that publishes articles and tutorials about server operations, new techniques and Linux security.

https://linuxize.com/post/chmod-command-in-linux/
Tee

Add a timestamp to piped output

Get moreutils to add some additional coreutils type features to your BASH environment

General
ls - used to list the files and directories in a directory
cd - used to change the current directory
pwd - used to display the current working directory
mkdir - used to create a new directory
rmdir - used to remove an empty directory
rm - used to remove a file or directory
touch - used to create a new file
cp - used to copy a file or directory
mv - used to move or rename a file or directory
nano or vim - used to edit text files in the command line
cat - used to display the contents of a file
less - used to view the contents of a file one page at a time
grep - used to search for a specific string of text in a file or multiple files
find - used to search for files in a directory
chmod - used to change the permissions of a file or directory
chown - used to change the owner of a file or directory
su - used to switch to the superuser or root account
sudo - used to execute a command as the superuser or root account
exit - used to log out of the current user account
clear - used to clear the terminal screen
history - used to display a list of recently executed commands
top - used to display the currently running processes and their resource usage
ps - used to display the currently running processes
kill - used to terminate a running process
df - used to display the available and used disk space on a file system
du - used to display the size of a directory or file
free - used to display the amount of free and used memory in the system
ln - used to create a symbolic link between a file or directory
tar - used to create and extract archive files
gzip and gunzip - used to compress and decompress files
ssh - used to securely connect to a remote system
scp - used to securely copy files between systems
rsync - used to efficiently copy files and directories between systems
ping - used to test network connectivity
traceroute - used to display the route a packet takes to reach a host
netstat - used to display information about network connections and routing tables
ifconfig - used to configure network interfaces
apt-get - used to manage packages on Debian-based systems
yum - used to manage packages on Red Hat-based systems
systemctl - used to manage and view system services

Someone collected a near perfect list of common BASH commands. You’ll want to revisit these for your quarterly refresher.‽ Don’t be caught with your finger up your nose, picking around for some kind of memory of something you can’t remember after the interrobang‽‽

I decided to copy paste, just in case. But don’t forget to give some props to this cat, Gias Uddin, for putting it together for us.

Whatchu do


Leave a Reply

Your email address will not be published. Required fields are marked *