Used to display files in the current or a different folder (with either absolute or relative path)
Command usage includes (among others):
ls- Shows files in a horizontal non-list formatls -l- Shows files in a vertical list formatls -lh- Shows files in a vertical list format with human-readable filesize
Used to change the directory for the current shell session
Command usage:
cd <new directory path>- Changes the current directory to the specified path
Used to search for patterns within text
Command usage:
grep <pattern> <file>- Pattern to search for in a file
Used to change ownership of files or directories
Command usage:
chown <new owner> <file or directory>- Set ownership of the file or directory to the new ownerchown -R <new owner> <file or directory>- Recursively set ownership of the directory and its contents to the new owner
Used to kill a process Command usage:
kill <pid>- Kill a process using its PIDkill -9 <pid>- Force kill a process using its PID
Used to display the last part of the contents of a file
Command usage:
tail -n <line count> <filename>- Display the last lines of the specified filetail -f <filename>- Continuously display new lines added to the specified file
Used to display mounted partition sizes and used space
Command usage:
df -h- Display disk space usage in a human-readable format
Used to edit permissions on a file or directory
Command usage:
chmod <new permission> <file or directory>- Set permissions of the file or directorychmod -R <new permission> <directory>- Recursively set permissions of the directory and its contents
Initializes a new git repo in the current working directory
Command usage:
Literally just git init in the current directory, that's it
Clones a remote git repo into the current working directory
Command usage:
git clone <remote repo url>- Clones a remote git repo into the current working directory
Shows the current local git repo status
Command usage:
git status- Shows the current local git repo status
Stages changes to be tracked by git
Command usage:
git add .- Stage all changes in the current directory for the next commit
Commits staged git changes
Command usage:
git commit- Commits all staged changesgit commit -m "<commit message>"- Commits all staged changes with a commit messagegit commit -a -S -m "<commit message>"- Commits all changes, signs the commit, and includes a commit message
Pulls the latest changes from the remote git repo
Command usage:
git pull- Pulls the latest changes from the remote git repo
Shows the latest history of changes for the git repo
Command usage:
git log- Shows the latest history for the local git repo