I thought it’d be a pain but installing programs through the terminal is actually so nice, I never would have expected it

  • kibiz0r@midwest.social
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 days ago
    • tab completion works in more places than you might expect
    • ctrl-a/ctrl-e for start/end of line
    • ctrl-u to clear the command you’ve typed so far but store it into a temporary pastebuffer
    • ctrl-y to paste the ctrl-u’d command
    • ctrl-w to delete by word (I prefer binding to alt-backspace though)
    • ctrl-r to search your command history
    • alt-b/alt-f to move cursor back/forwards by word
    • !! is shorthand for the previous run command; handy for sudo !!
    • !$ is the last argument of the previous command; useful more often than you’d think
    • which foo tells you where the foo program is located
    • ls -la
    • cd without any args takes you to your home dir
    • cd - takes you to your previous dir
    • ~ is a shorthand for your home dir
    • hamsda@lemm.ee
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      2 days ago

      Saved! Thank you so much.

      I’ve used Linux full-time since late 2020 and I never knew about ctrl+y and ctrl+u.

      I’d also like to contribute some knowledge.

      aliases

      You can put these into your ~/.bashrc or ~/.zshrc or whatever shell you use.

      ###
      ### ls aliases
      ###
      # ls = colors
      alias ls='ls --color=auto'
      
      # ll = ls + human readable file sizes
      alias ll='ls -lh --color=auto'
      
      # lla = ll + show hidden files and folders
      alias lla='ls -lah --color=auto'
      
      ###
      ### other aliases
      ###
      # set color for different commands
      alias diff='diff --color=auto'
      alias grep='grep --color=auto'
      alias ip='ip --color=auto'
      
      # my favourite way of navigating to a far-off folder
      # this scans my home folder and presents me with a list of
      #    fuzzy-searchable folders
      #    you need fzf and fd installed for this alias to work
      alias cdd='cd "$(sudo fd -t d . ${HOME} | fzf)"'
      

      recommendations

      ncdu - a shell-based tool to analyze disk usage, think GNOME’s baobab or KDE’s filelight but in the terminal

      zellij - tmux but easy and with nice colors

      atuin - shell history but good, fuzzy-searchable. If you still have the basic shell history (when pressing ctrl+r), I cannot recommend this enough.

      ranger - a terminal file-browser (does everything I need and way more)

        • hamsda@lemm.ee
          link
          fedilink
          arrow-up
          2
          ·
          1 day ago

          Also, Terminal User Interfaces are a nice middle ground between learning terminal commands and having a GUI.

          Yes, TUIs definitely help reduce possible stress and fear of complexity for new users.

          Thanks for the git link, didn’t know that, just starred it :)