Text manipulation & cool shortcuts!
Text manipulation
command | grep "filter" # Filter outputcommand | less # Page through outputcommand > file.txt # Save output to filecommand >> file.txt # Append output to filecommand1 | command2 # Pipe output of cmd1 into cmd2
# Examplescat /var/log/pacman.log | grep installed | tail -20 # Last 20 installed packagesjournalctl -b | grep error # All errors from this bootCool shortcuts
Tab # Auto-complete (hit twice for options)Ctrl + C # Cancel current commandCtrl + D # Exit shell/logoutCtrl + L # Clear screenCtrl + R # Search command history (life-changing!)!! # Repeat last commandsudo !! # Repeat last command with sudohistory # Show command historyalias ll='ls -lah' # Create command shortcut (add to ~/.bashrc)