Read before you roll out the guillotine! :p

I am a lifelong MS user. I cut my teeth on DOS 5, then everything from Win95 forward. Working in IT Ops, I’ve leveraged batch files and powershell many times in my career so I’m not afraid of the terminal but I’ve always focused on Windows as it was the tools of my trade. Therefore, I only ever dabbled in Ubuntu, Mint etc on secondary hardware.

In recent years I’ve moved away from Ops and my need to keep up-to-date with Windows has disappeared, I’m just a user now so in the middle of last year, I joined the fold and finished migrating all my hardware to Linux - I’ve been very comfortable ever since. Everything just worked including my favourite games and after a week I realized I would never go back.

I rocked Bazzite on my main PC and enjoyed the confidence that immutability gave me while learning - and it did save my backside when I made a largish mistake that cost me the ability to boot.  A couple of quick commands later and I was back in business.  I believe that an immutable distro + flatpack is the perfect starting point for most n00bs and average windows refugees.

I have since expanded my use and I reached a point where immutability was becoming a hurdle. There are ways around this but I didn’t want to complicate a beautiful thing so now I’ve come around full circle to my original choice in KDE Fedora.  Now that I’m several months in and 100% certain that I will never go back to Windows, I decided to start using the terminal to do things, as I’ve discovered that GUI applications are fine but the terminal is where the real power is unlocked.

My trouble is that I’m not 12 anymore attempting to learn DOS to move, rename, zip and delete files with near unlimited spare time with which to learn.  Typical Linux documentation is fantastically dense and guides or forum posts usually lead you down a path mostly blindfolded. The good ones explain what is happening but mostly in a summary way - so you must trust the source and hope nothing has changed between the date of publish and your version.

It’s then that I had a thought - AI is supposed to be good at this sort of stuff, let’s put that to the test.

I threw it a bunch of prompts. I wanted to mount a network share, rsync several folders to that share, create a log for monitoring, set it all up in a script and trigger it on a schedule.  I could do this in about 10mins in Windows but in Linux, I barely had a clue where to start - apart from rsync.

So, I leverage the AI and what it gave me was pure gold.  Not only giving me the commands I needed but also explaining what each portion of the script does - plus detail about how to dry run to ensure it would do as I needed - plus the source links to validate what it has told me.

Most of you are probably thinking “Big whoop, you discovered how to use basic Gen AI and have a cheat code. You haven’t learnt anything!” - and you’re 100% right!

While I could follow the overall premise of the scripts, I still had little idea what the commands and switches actually did. Previously, a lot of what I learned in DOS and powershell was taking other people’s work or scripts and Google bits to understand it enough that I could wield it myself and experiment, gradually expanding on it over time.  Sadly I don’t have that sort of time and luxury any more.  That’s when I realized I could leverage the real power of the AI tool.

I could use it as my own mentor, asking it 1000 obnoxious n00bie questions on the details of exactly what each command did, what every single line of the script did. I could ask it to explain in a different way or liken it to a concept I did understand and then feed it back my interpretation to check that I had the right idea.  What does that parameter actually do? What if I changed this? Etc.

Naturally curious, I have found myself annoying coworkers in the past, asking for this level of detail from them as I learn better in this way than reading documentation and struggling when I have gaps in my knowledge.

This was the sort of tool or mentor I’ve been wanting all my life and it’s my new Linux superpower.  Yes, I can cheat my way to the answer but more than that, I can also quickly break it down to understand exactly what I’m doing, so I’ll gradually learn more - and I keep my friends and co-workers on-side, only annoying them when I have really ugly problems!

Now I have my mentor, my next step is setting up a VM as a block of wood to practice my craft on!

I don’t want the AI forced on me like Windows is doing, but when I have a solid use case for it, I’m happy to go use it and leverage it to my benefit.

I’d be interested to know if anyone else has had similar experiences or has tried different ways of using AI for good rather than just slop.

  • Rentlar@lemmy.ca
    link
    fedilink
    arrow-up
    14
    ·
    6 days ago

    ☁️✊️😠 “We didn’t need a robot’s help, we were perfectly capable of accidentally sudo rm -rf /* ing our disks on our own!”

    I’ll be honest, I don’t like the way AI is pushed and speculation ruining the price of computing, but it has helped me once or twice. For example I used someone’s vibecoded driver patch to get a relatively ancient audio interface working, which was the last thing that I would have missed using Windows for.

    • FauxLiving@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      6 days ago

      It is certainly overhyped for the purposes of continuing this stock market bubble and so many of the claims about capabilities are nonsense. We’re not going to have AGI, it’s not going to mass replace knowledge workers, it won’t replace software engineers. It has knowledge but lacks intelligence.

      But it’s also nonsense when people pretend that it isn’t useful at all and every usecase is ______slop.

  • JTode@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    6 days ago

    Why not rsync directly? Why insert a network share to muddy the process?

    Anyways, this is pretty much the “good” use of AI, as I see it. Indeed, if models are more tightly trained to focus on one specific bit of data, such as the manual for an application, a locally-run LLM could transform the help menu into a chatbot that teaches you the app.

    This could be the future reality, if the “throw a firehose of money and a bunch of horrible code at it and hope we can charge people who have no money a lot of money to rent our bullshit” brigade are guillotined.

  • krimson@lemmy.world
    link
    fedilink
    arrow-up
    9
    ·
    6 days ago

    For simple tasks AI can be useful and there’s nothing wrong with it. I use it sometimes to generate simple standalone functions.

    BUT if your problem is a bit more complex it very often spews out nonsense so be wary of that.

  • thedeadwalking4242@lemmy.world
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    6 days ago

    Any question that you could get the answer too from reading a sentence or two from a book or article is generally an LLM will probably be able to answer.

    It’s good for surface level exploratory research.

    The deeper you go the more fallacies and bias start to enter the mix. LLMs by nature are biased and will only present you with one or two solutions/options/opinions on why and what.

    Knowing when your hitting that point is difficult. I urge you to read documentation and human written guides and articles once you find yourself surprising what the LLM can give you.

    As a software developer and script writer myself I can guarantee you what a LLM writes is not “gold” it’s more like bronze at best.

  • Nibodhika@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    6 days ago

    Honestly that’s probably a good use case for LLMs, mostly because there are enough Linux forums that there will be enough content for it to scrape. Just be weary as it can hallucinate or worse use joke answers as real and tell you to run :(){ :|:& };: because someone made a joke saying that was the way to solve your issue in a forum.

    I agree with the man pages being very heavy, which is why I like https://github.com/tldr-pages/tldr there’s also a web app if you prefer that https://tldr.sh/ in short its a condensed man page to the most common cases for a tool. It’s less versatile than LLMs, but it might give you confirmation on the commands the LLM is telling you to run.

    Overall I think yours is a good approach, just be mindful about wrong commands.

  • affenlehrer@feddit.org
    link
    fedilink
    arrow-up
    6
    ·
    edit-2
    6 days ago

    Sorry, it’s a bit long so I only skimmed your post. However, I sometimes use LLMs for Linux issues as well.

    I think they’re pretty good at explaining concepts and give you some hints which commands to use.

    However, in some situations they tend to do things their way and not the way the distribution you’re using intended. E.g. if you have a distro like fedora that comes with podman it will likely have you install docker if you ask something about containers.

    Or in other cases it might basically vibe code you a bunch of shell scripts for what you want, even though your distro already comes with the feature (but the LLM didn’t know about it).

    So it’s a bit of a two side sword. Explaining a concept usually works great. But otherwise prompt it to use Internet search for the latest and distribution specific docs and to always prefer ideomatic solutions.

    If the LLMs answer to your problem looks like a whole lot of work, there’s a good chance these an easier way to do it. If it doesn’t work and the LLM continuously keeps trying different approaches, there’s also a good chance it’s getting desperate and doing more dangerous things, probably not the right ones.

    • meathorse@lemmy.worldOP
      link
      fedilink
      arrow-up
      2
      ·
      6 days ago

      That’s a good point and something I haven’t really considered but will keep that in mind moving forward - that’s part of my problem is not really being aware of what already exists or the most suitable method (or for different distros).

      That’s what ended up getting me into trouble on Bazzite when I was attempting to use Fedora documentation thinking it’s similar and broke boot trying to mess with fstab. Only recently found out why that didn’t work!

  • FauxLiving@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    6 days ago

    It can be useful as long as you think of it like a search engine that answers your questions (with a degree of inaccuracy) and not use it as a tool to do the work for you. Asking questions and exploring new software helps you build a useful set of knowledge. Telling the AI to give you the exact list of commands you need to run will only harm your learning process.

    It sounds like you’re using it as a tutor, if you’re using a system that does web search and summarization (and it has access to the primary documentation) it can achieve a pretty high accuracy. Just be aware that it will tell you things that are wrong and give you bad commands sometimes.

    To mitigate this (and it’s also a good practice in general) make sure it isn’t the only source of information and also RTFM.

  • somethingDotExe@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    6 days ago

    I learn more from AI than I have learned from all kinds of sources for a long time. I use Mistral Le Chat. Since I don’t trust any other ai’s out there with my data, and it has just been life changing tool for me. I actually love all the errors while I vibecode etc. Because it is the troubleshooting and the errors that keeps me hot and learning. I don’t care what everyone says. I hate AI for all the shit it has forced down peoples throat. And if my only option was to pay for Chatgpt, I wouldn’t use AI either. But I love the Mistral Guys. I have spoken to them on many occasions. I know whst the company stands for and are bind to EU gdpr laws. So, I have no problem supporting this type of AI.

  • Quazatron@lemmy.world
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    6 days ago

    You’re doing it right, using it as a tool to learn.

    I’m doing the same to get a handle on Python. I question the steps, compare it with other sources, and try to get comfortable coding it myself. I then use it to review my code, and get further insights.

    It’s a tool. Just another tool.

  • jellyfishhunter@lemmy.world
    link
    fedilink
    arrow-up
    2
    arrow-down
    1
    ·
    6 days ago

    I’m in the same boat. For many things I have zero experience in, LLMs provide me with good guidance and starting points. For me it was self-hosting and Smart Home. Of course hallucinations are real and the output can be nonsense, especially if your questions become increasingly niche. However some healthy skepticism, evaluation of answers and additional sources (just searching for key words online) keep me moving forward.

    Just don’t try to learn anything dangerous from it, like identifying mushrooms.

    PS: all those links and tips in the comments are worth gold

  • just_another_person@lemmy.world
    link
    fedilink
    arrow-up
    5
    arrow-down
    4
    ·
    6 days ago

    It won’t work.

    Like every these, repetition is key, and also stepping through each idea to get to an outcome.

    Good luck to you though.