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

  • mlg@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 days ago

    Wait till you try fish or zsh loaded with all the fancy plugins lol

  • 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 :)

  • glitchdx@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 days ago

    if I could copy pasta with ctrl-c and ctrl-v in terminal, then 90% of my hatred of the command line would evaporate instantly.

    • grrgyle@slrpnk.net
      link
      fedilink
      arrow-up
      1
      ·
      3 days ago

      What Ctrl+Shift+(do a little spin)+Ins isn’t intuitive enough for you??

      Jokes aside, that’s understandable. I guess I’ve just become used to it, but there must be some way to override the default binding if you don’t like it… Personally I like the kitty terminal’s approach which uses mod+c/v for copy and paste in the terminal like you’d expect, while still leaving ctrl+c/v for sigint and verbatim respectively.

      • glitchdx@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        3 days ago

        I don’t want to pasta with middle click. I want to scroll with middle click. I want to pasta with ctrl-v.

        • MonkeMischief@lemmy.today
          link
          fedilink
          arrow-up
          0
          ·
          edit-2
          3 days ago

          I don’t want to pasta with middle click. I want to scroll with middle click. I want to pasta with ctrl-v.

          🍝🤌🤌🤌

          Lol jokes aside, like they said above just add a shift and you’re good. Ctrl+shift+c and Ctrl+shift+v a’cut’a a’nna pasta jus’sa fine! Muah!

          • glitchdx@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            10 hours ago

            Well, yes. But also that only addresses half my comment. I suppose it’s fair since my own comment only addressed half of the previous comment.

  • yesman@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    4 days ago

    The Windows terminal has some very good commands. ‘ssh username@server’ can log you right into a Linux machine!

  • it_depends_man@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    4 days ago

    Also, updates.

    “hey computer! Update!”

    “Sure thing, here is a list of 57 packages I will update, y/n?”

    “y”

    “ok… done!”

    👌