How to Run a Bash Script on Startup!!

Поделиться
HTML-код
  • Опубликовано: 20 авг 2024
  • Hey Everyone! In this video I go over how to create a simple bash script and have it run when your linux device starts up!

Комментарии • 24

  • @Miguel_GM
    @Miguel_GM 2 года назад +60

    Consider biger fonts, so we can actually see something ;)

  • @conradobotta5182
    @conradobotta5182 Год назад +6

    te lo agradezco de corazon estoy desde las 10 pm y son las 2am buscando en foros y esta es la unica que me fuincionó. Ahora voy a poder abrir mi server de minecraft tranquilamente. Agradecido de corazon

  • @halumetri8957
    @halumetri8957 2 года назад +4

    i can't believe you are into linux as well, been watcing your channel for a few years, coudn't have guessed

    • @THESpartanNinja5CC
      @THESpartanNinja5CC  2 года назад +1

      Yeah haha I work in IT so I've got a little experience. I love raspberry pi's so I have quite a few of them haha

  • @pietraderdetective8953
    @pietraderdetective8953 3 месяца назад +1

    man you could've made the font even smaller!
    JK
    great video...but please do something with the font. Cheers!

  • @BumbleBeeTF
    @BumbleBeeTF Год назад +4

    Great work on the video; however, it didn't work for me. I'm using the latest lubuntu on an atomic pi. Any suggestions?

  • @Jean-uw4tz
    @Jean-uw4tz 3 месяца назад

    simple but extremely useful =)

  • @Jeff_Seely
    @Jeff_Seely 10 месяцев назад +1

    Thanks for this very helpful video!. I need to change my screen resolution on start-up. If I am running a kde or another desktop enviroment, thay automatically do this but I only run qtile and xmonad window managers. They don't not automatically change resolution. If I auto-run my xrandr command script in initd, will it work for window managers? Also, how do you get sudo to authenticate within your bash script? Thanks man, I really appreciate this instructional video

  • @ChipsyRoblox
    @ChipsyRoblox 2 года назад +1

    What's up youtube, it's Spartan Hacker 😁

    • @THESpartanNinja5CC
      @THESpartanNinja5CC  2 года назад +1

      Lol yep 😂

    • @ChipsyRoblox
      @ChipsyRoblox 2 года назад +1

      @@THESpartanNinja5CC bro how ling did it take you to learn computer and what other languages do you know 🤔

    • @THESpartanNinja5CC
      @THESpartanNinja5CC  2 года назад +1

      @@ChipsyRoblox I mostly know SQL and a little bit of python. I studied IT stuff in college and I have a couple of certifications. But it doesn't take that long to learn

    • @thespicehoarder
      @thespicehoarder 2 года назад

      @@THESpartanNinja5CC Where do you recommend getting certs?

    • @THESpartanNinja5CC
      @THESpartanNinja5CC  2 года назад

      @@thespicehoarder CompTIA are widely accepted so those are good ones to start with. Theres also Microsoft ones, along with LPI (Linux purpose institute) if you want to get into cloud stuff you can go aws, google, or azure

  • @mr_redstone6699
    @mr_redstone6699 10 месяцев назад

    Did not work for me, I am using Kali Linux on a Raspberry Pi, any suggestions on how to fix it?

    • @AnxulJyoti
      @AnxulJyoti 6 месяцев назад

      yes, you can use crontab for automating the bash files on startup
      e.g. you are having a xyz.sh script at /home/user level then
      sudo crontab -e (this will open a text-editor in root folder)
      now add your script at the bottom like
      @reboot /home/user/xyz.sh (save it and exit)
      now reboot the system

  • @BEDavisBrown
    @BEDavisBrown 2 года назад

    I have chained commands with && but if it changes the system at root level it needs sudo for each command.

  • @evilish7
    @evilish7 5 месяцев назад

    Does the system ask you for root password when automatically running this script? I'd like to have automatially run this script as root/with sudo but without providing password after every startup or reboot.

    • @zorg1983
      @zorg1983 4 месяца назад

      Run the script in root user so it won't ask.

  • @michaelhaines8853
    @michaelhaines8853 2 года назад +1

    I got all the way through and my script was ininit.d (sudo raspivid t -0) however when i rebooted the system it did not show the camera feed which that code should