I just realized that you can run a command at login by appending it to your .bashrc

For instance, I added a curl pointing to a certain address that immediately upon login returns a message that tells me whether I’m connected to my VPN provider or not.

Sorry for the beginner revelation. Just thought it was cool. :3

    • melroy@kbin.melroy.org
      link
      fedilink
      arrow-up
      5
      arrow-down
      1
      ·
      15 hours ago

      Thank me later:

      alias ls='ls --color=auto'
      alias dir='dir --color=auto'
      alias vdir='vdir --color=auto'
      alias grep='grep --color=always'
      alias fgrep='fgrep --color=auto'
      alias egrep='egrep --color=auto'
      alias diff='diff --color=auto'
      alias ip='ip --color=auto'
      
      
      alias ll='ls -alFh'
      alias la='ls -A'
      alias l='ls -CF'
      alias minicom='minicom -con'
      alias gpgsign='gpg --detach-sign --armor "$@"'
      alias g='git'
      alias untar='tar -xvf'
      

      and more…

      Also if you are more advanced try Starship https://starship.rs/. If you are even more advanced then move away from bash and go to Zsh.

      • MonkderVierte@lemmy.zip
        link
        fedilink
        arrow-up
        1
        ·
        27 minutes ago

        Just so you know, fgrep and egrep are symlinks to grep and “auto” (color only for interactive stdout) is the default in most tools anyway. And “always” on grep will break some scripts.

      • thingsiplay@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        13 hours ago

        alias grep='grep --color=always'

        Is this a typo or copy-paste error? Why are all other commands, including the grep variants, set to auto, but not grep itself? Always color information could be in your way if you combine its output with other programs.