Lettuce eat lettuce

Always eat your greens!

  • 0 Posts
  • 6 Comments
Joined 1 year ago
cake
Cake day: July 12th, 2023

help-circle




  • history | grep command you’re searching for

    That will return all commands you’ve typed that contain that keyword. Helps if you remember part of a command, but can’t remember the specific flags or the proper format.

    If there are common commands that you use over and over, turn them into a Bash script and name the script something descriptive.

    I do that for long commands that I don’t want to type out, like my whole system update workflow: sudo apt update -y && sudo apt upgrade -y && sudo flatpak update -y

    I saved that as a Bash script and called it “update.sh” then I saved it in my home directory. Now whenever I want to do a full system update, I just type ./update.sh and it asks me for my password, then updates my whole system without me having to do anything else. I do this with several different tasks like my remote Ansible server updates.

    Other than that, you can buy/make a linux command cheat sheet with the most common commands. Keep it with you or next to your computer. Look at it whenever you need a refresh.