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

  • ssillyssadass@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    6 hours ago

    I’m on the other side of the coin, I really don’t know how I’m supposed to learn to use the terminal. I can do sudo apt get to get some programs and updates, as well as mv and cp, but that’s where it stops for me.

    • Liz@midwest.social
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 hours ago

      I literally only use it when a how-to guide explains exactly what to do and why. Then I forget what I did and look up how to do it again six months later. I’m fine with this arrangement, though I will prefer to have to use it less.

    • lightnsfw@reddthat.com
      link
      fedilink
      arrow-up
      4
      ·
      4 hours ago

      You need a purpose. For instance I needed to copy and edit config files for a bunch terminals my company has deployed last week. Instead of manually copying the template directory 80 times and editing the 2 lines that needed to be changed in the parameter file for each one I used powershell to extract the name and id for each terminal from the log files and create copy of the template directory for each one, then replace the terminal name and id in the parameter file of the new directory with the ones extracted from the logs. This would have taken me all day to do manually and it only took about 45 minutes to write up the script and run it. I did have some prior experience with doing this kind of thing but hadn’t tied them all together lile that before so i learned some stuff.

    • fibojoly@sh.itjust.works
      link
      fedilink
      arrow-up
      3
      ·
      5 hours ago

      Maybe you need to have some sort of objective before you get started, otherwise yeah, you don’t have much to do in the console :) In my case I only use linux for work, so I’m ssh-ing away and running commands to compile this, apply that, show me the logs for this, grep that, etc.

  • mlg@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    7 hours ago

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

  • BackgrndNoize@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    6 hours ago

    I’d use the terminal more if it had better auto suggestions, and allowed me to treat the text like any normal text editor, instead of having to learn keyboard shortcuts just to basic text manipulation. So far Warp terminal is the best option I’ve found

  • SSNs4evr@leminal.space
    link
    fedilink
    arrow-up
    1
    ·
    7 hours ago

    I’m getting ready to change one of my Ubuntu machines over to Mint, as the next iteration of Ubuntu requires more RAM. While I’ve done these changes many times, I’ve never quite understood the deal with setting up the partitions.

  • kibiz0r@midwest.social
    link
    fedilink
    English
    arrow-up
    101
    ·
    2 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
      7
      ·
      edit-2
      10 hours 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)

      • fibojoly@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        ·
        5 hours ago

        +1 for Atuin. I constantly use it on my machine and SSH-ing on remote machines who don’t have it is an absolute pain.

        I’m gonna have to save this thread and check some of those!

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

          Yeah, linux-servers without the tools installed in your PC are a hassle. That’s why I learned to work with vim, as that’s in nearly every distro’s repo.

          I recommended atuin as I was using it before, but currently I am using ohmyzsh with the fzf plugin for zsh. This has a very atuin-like interface and handling, but as a plugin for zsh itself.

    • MonkeMischief@lemmy.today
      link
      fedilink
      arrow-up
      6
      ·
      1 day ago

      Saving this! Absolutely gold, thanks for writing it up. You’re what makes the Linux community cool. ❤️

      tab completion works in more places than you might expect

      I’ve found tab to be such a nice “please give me a hint” button.

      • Bonus tip : Sometimes you won’t get auto complete because there’s too many possibilities and the computer can’t be certain which one you want. Hitting tab multiple times will show the possibilities, so you can type in enough characters to remove ambiguity, hit tab again, and boom auto complete!

      …That was a terribly convoluted explanation I’m sorry. Just try hitting tab multiple times for fun if you’re stuck it’s kinda handy. Lol

    • ayyy@sh.itjust.works
      link
      fedilink
      arrow-up
      7
      ·
      1 day ago

      If you’re looking for a full list of these kind of navigation shortcuts, they all come from readline so read the man page for that. Or just look up the basic navigation of emacs which is what readline is mimicking.

      • kattfisk@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        5
        ·
        edit-2
        11 hours ago

        A neat thing is that a lot of command line programs use readline. So learning and configuring it will also be useful in for example the Python REPL and calc.

        Here are some neat configuration options you can put in ~/.inputrc

        set completion-ignore-case on
        set show-all-if-ambiguous on
        set completion-prefix-display-length 9
        set blink-matching-paren on
        set mark-symlinked-directories on
        

        And if you are a sensible person who is used to vim

        set editing-mode vi
        set show-mode-in-prompt on
        
    • exocortex@discuss.tchncs.de
      link
      fedilink
      arrow-up
      14
      ·
      edit-2
      2 days ago

      I’ve been using the commandline for so long but was always too lazy to look up the rest of these commands after ctrl+a/e and ctrl+r THANK YOU!!!

      post this commend again and again! There’s always lazy idiots like me who will be helped that way!

      • Dumhuvud@programming.dev
        link
        fedilink
        English
        arrow-up
        10
        ·
        2 days ago

        I believe, these are Emacs shortcuts. There’s also set -o vi in bash, but I’ve never used it, so can’t vouch for it.

        • apelsin12@lemm.ee
          link
          fedilink
          arrow-up
          7
          ·
          2 days ago

          Explains why they are so illogical! Unfortunately i think its better to just learn the defaults since i remote into lots of servers where i dont carry my config

        • Hawke@lemmy.world
          link
          fedilink
          arrow-up
          4
          ·
          1 day ago

          That’s good to know. It’s interesting that the other commenter thinks emacs shortcuts are illogical. I’ll make my best guesses at the logic

          • ctrl-a/ctrl-e for start/end of line

          a is the beginning of the alphabet; e for 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

          No idea here. Seems similar to nano with k-“cut” and u-”uncut”.

          • ctrl-w to delete by word

          w for word obviously.

          • ctrl-r to search your command history
          • alt-b/alt-f to move cursor back/forwards by word

          r reverse, b back, f forward. Not sure why alt vs control though; presumably ctrl+b and ctrl+f do different things although I know emacs likes to use Alt (“Meta”) a lot.

          • MedicsOfAnarchy@lemmy.world
            link
            fedilink
            arrow-up
            6
            ·
            1 day ago

            In the 1980s, Digital Equipment Corporation had a word processor, WPS. Ctrl-u cleared the line you were typing and put it into the paste buffer. Maybe legacy usage?

    • myotheraccount@lemmy.world
      link
      fedilink
      arrow-up
      11
      ·
      2 days ago
      • alt-. also pastes the last argument of the previous command (useful if you need to modify it a bit)
      • instead of any shortcuts starting with “alt” you can also press “esc” followed by the second key, e.g. pressing “esc”, releasing it and then “a” is the same as pressing “alt-a” (useful if you have only one hand available, or if alt is not availalble)
      • if you put a space before a command, it will not be saved in history (useful sometimes, e.g. if you pass a password directly as an argument)
    • Dumhuvud@programming.dev
      link
      fedilink
      English
      arrow-up
      4
      ·
      2 days ago

      Nice list, TIL about Ctrl+U and Ctrl+Y.

      If I may add, Ctrl+X into Ctrl+E opens $EDITOR to edit the current line.

    • katy ✨
      link
      fedilink
      arrow-up
      5
      ·
      1 day ago

      i’d also recommend scoop. when i had windows before i switched, i preferred it to winget or chocolately.

    • Trainguyrom@reddthat.com
      link
      fedilink
      English
      arrow-up
      8
      ·
      1 day ago

      As an administrator, powershell is an essential tool these days. There are tunables that Microsoft simply only exposes via powershell even in their cloud Microsoft 365 environments. Just last month I had to rely on Powershell to trim previous versions on SharePoint, and 2 weeks ago I had to use Powershell to adjust a parameter on Exchange.

      But also being able to pop a Powershell session and quickly apply a registry fix or run a diagnostic command or even just install a piece of software without disrupting a user’s work is absolutely brilliant (plus saves a call when I can just email back and say “I’ve pushed it remotely, reboot and it should be sorted now”)

      • Hawke@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        1 day ago

        As a sometimes Windows admin, I completely agree. Plus so many things that become simple one-liners instead of taking forever farting around in a GUI tool where a little misclick screws up everything and documentation requires 27 pages of giant screenshots.

  • it_depends_man@lemmy.world
    link
    fedilink
    arrow-up
    157
    ·
    2 days ago

    Also, updates.

    “hey computer! Update!”

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

    “y”

    “ok… done!”

    👌

    • uniquethrowagay@feddit.org
      link
      fedilink
      arrow-up
      2
      ·
      9 hours ago

      It’s not a big deal via terminal but for me and probably the average user, a decent update UI is superior. I want my computer to remind me like once a week and then update with one or two clicks. Updating via terminal does not appeal to me.

      • jj4211@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        9 hours ago

        And this happens too. I get a little tray icon saying ‘do updates’ and I tap that and all my applications whether fwupd (firmware), flatpak or rpm updates are there and I click ‘go’, including the most recent nvidia drivers. In my case, KDE ‘discover’ does this for me. I’m so lazy as to not want to bother running the three terminal commands (dnf, fwupdmgr, and flatpak).

        Meanwhile, under windows, I do that, but then it doesn’t do my firmware, so my hardware vendor has their own updater (which also suggests driver updates that Microsoft does not suggest), but if I use those then I still miss out on decent nvidia drivers, I need to go to nvidia to get those updates. And pretty much every application is then independently telling me time to update something or another in a never ending parade of ‘update me now’ icons in the tray.

        Meanwhile it can be greatly mitigated in Windows by opening up a terminal and doing a winget update. Except it keeps offering up this one Office update that hangs with a blank terminal in my screen, and it still misses half the stuff…

    • Pennomi@lemmy.world
      link
      fedilink
      English
      arrow-up
      123
      ·
      2 days ago

      But how do Linux users handle the crippling loneliness of their operating system not pestering them with ads on every update? How else can you know if your computer loves you? Where is the warmth of the corporate embrace?

    • KneeTitts@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 day ago

      Guess what I did last night? I spent 4 hours working on getting PSD, XCF and KRA thumbnailers working in Mint. It took custom scripts to be written and each one required different commands because KRA files are just a zip file so you have to extract that and grab one of 3 possible preview files that might exist inside that zip and make that the thumbnail, while in gimp files you cant just use convert command, even convert[0] will only turn the first layer into a thumbnail and thats completely useless. And to top off all that, I finally got thumbnails working in gnome/nautilus but Only the XCF thumbs will generate in cinnamon/nemo (I still have no clue why that is) but I cannot just switch to gnome because there is technically no gnome variant of Mint so gnome doesnt work 100%… etc etc etc

      Linux is still not there, this stuff should be simple and automatic. If a 20 year professional took 4 hours to get this far, the average user will give up immediately. Yes Mint is still my daily driver, but seriously thumbnails should not be this much work.

    • wise_pancake@lemmy.ca
      link
      fedilink
      arrow-up
      15
      ·
      2 days ago

      “Hey computer, I don’t like when you ask for that confirmation, just do it”

      “Oh, -y, I got you”

  • glitchdx@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 day 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.

      • glitchdx@lemmy.world
        link
        fedilink
        English
        arrow-up
        7
        ·
        1 day ago

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

        • kattfisk@lemmy.dbzer0.com
          link
          fedilink
          arrow-up
          5
          ·
          11 hours ago

          Then change the keyboard shortcuts of your terminal so that it does that. If you can’t, then switch to a terminal that lets you change the keyboard shortcuts.

        • MonkeMischief@lemmy.today
          link
          fedilink
          arrow-up
          9
          ·
          edit-2
          1 day 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!

    • grrgyle@slrpnk.net
      link
      fedilink
      arrow-up
      2
      ·
      1 day 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.

  • katy ✨
    link
    fedilink
    arrow-up
    4
    ·
    1 day ago

    i like leaving top on all day just to watch it.

  • yesman@lemmy.world
    link
    fedilink
    arrow-up
    103
    ·
    2 days ago

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

    • Landless2029@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      2 days ago

      I setup open SSH on windows so you can swing it both ways!

      My main gripe is it runs cmd.exe and I gotta powershell to jump into that. If you auto powershell it doesn’t work right.

  • kittenzrulz123
    link
    fedilink
    arrow-up
    18
    ·
    2 days ago

    Just wait until you find the fun TUI utilities, ill share a few:

    • Shell: Fish (has powerful auto-complete, very fast, written in rust)
    • Montior: Btop (monitors all system resources and processes)
    • Fetch: Fastfetch (perfect for showing off on !unixporn@lemmy.world, for !unixsocks@lemmy.blahaj.zone Hyfetch is reccomnded)
    • Brower: BrowSH (its a browser in your terminal)
    • Text Editor: Vim (the best text editor, remeber to use esc + : + q to close or wq to write close vim. However when you open vim you can never quit)
    • File manager: Ranger (if cd + ls is too inconvenient)
    • Games (yes you can even play games in the terminal): 2048, Chess-TUI, NSnake, and Micro Tetris

    More cool TUI tools

    • katy ✨
      link
      fedilink
      arrow-up
      3
      ·
      1 day ago

      next step to full on conversion is making your own dotfiles repo :)

      • kittenzrulz123
        link
        fedilink
        arrow-up
        4
        ·
        24 hours ago

        Then get an old librebooted Thinkpad X230 with Arch GNU/Linux (and remind eveyone it’s GNU + Linux) :3

  • hansolo@lemm.ee
    link
    fedilink
    English
    arrow-up
    69
    ·
    2 days ago

    I once installed HP shitbox printer drivers from the command line in 30 seconds, and the shitbox printer just…worked.

    My heart soared higher than the eagle. I touched the face of the one true FOSS God, and felt that thing when astronauts have epiphanies about the Earth. 10/10, would recommend.

    • wise_pancake@lemmy.ca
      link
      fedilink
      arrow-up
      31
      ·
      2 days ago

      The moment I loved the FOSS community was when I went on an Linux IRC channel, complained about my wifi not working, and some stranger messaged me detailed instructions with a patch in 20 minutes that completely fixed my issue.

    • Lucy :3@feddit.org
      link
      fedilink
      arrow-up
      18
      ·
      edit-2
      2 days ago

      I once plugged my linux laptop into the scanner and it just worked

      I spent days tinkering with proprietary, outdated (seriously, win XP as target) programs that provide sort-of drivers, and nothing worked, on windows.

      • TunaLobster@lemmy.world
        link
        fedilink
        arrow-up
        13
        ·
        2 days ago

        I think that is just wildly amazing that printer drivers in Linux so often just work. I plugged in a wireless printer the other day and the hardest part was connecting it to the network. Once that was done BOOM Ubuntu found it and I could print. Those driver maintainers are doing a great job!

        • superkret@feddit.org
          link
          fedilink
          arrow-up
          6
          ·
          edit-2
          1 day ago

          Funnily enough, you have the Apple folks to thank for that.
          sane-airprint and sane-airscan are Mac inventions, but Macs use the common Unix printer system, so Linux benefits from it

        • Lucy :3@feddit.org
          link
          fedilink
          arrow-up
          15
          ·
          2 days ago

          Capitalism vs Communism on a small scale

          One is “We’re not making profit anymore, so not paying anyone to do this. Also not publishing the source because of IP.”, the other one is “I have fun doing this, I think I’ll adapt the driver to my printer. Open ofc, so others can benefit, while all others, including me, benefit from others achievements.”

    • Colloidal@programming.dev
      link
      fedilink
      English
      arrow-up
      10
      ·
      2 days ago

      Mine worked out of the box on mint. Like, it detected the network HP shitbox and I could print, no user intervention. I was floored.