Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    id like some help making an idea into reality


    hi everyone i would like to wright some sort of script that will update my distro. then after the update is complete. to shut down the system.

    i know its
    Code:
    sudo dnf -y update
    to update the system via terminal

    im not sure how to properly shut down the system via terminal.

    or how to combine them in a script to achieve the desired objective

    im running fedora 28.

    im not exactly new to linux but i am realtivly new to linux programing i have had some visual basic 6.0 training about 11 years ago but i haven't coded since

    thanks in advance for any help you may be able to provide


    Sent from my WAS-LX1A using Tapatalk

  2. #2
    Quote Originally Posted by gillibrand20 View Post
    hi everyone i would like to wright some sort of script that will update my distro. then after the update is complete. to shut down the system.

    i know its
    Code:
    sudo dnf -y update
    to update the system via terminal

    im not sure how to properly shut down the system via terminal.
    did you try looking ANYTHING up? maybe putting 'how to shutdown linux from terminal" into google and pressing enter? you might have then run across the 'shutdown" command, and guess what that does? it SHUTS DOWN the system! WOW!
    or how to combine them in a script to achieve the desired objective
    you put the commands into a file. make the file executable. then run it.
    im running fedora 28.

    im not exactly new to linux but i am realtivly new to linux programing i have had some visual basic 6.0 training about 11 years ago but i haven't coded since

    thanks in advance for any help you may be able to provide


    Sent from my WAS-LX1A using Tapatalk
    putting two lines into a text file isnt 'programming"

  3. #3
    Quote Originally Posted by habit View Post
    did you try looking ANYTHING up? maybe putting 'how to shutdown linux from terminal" into google and pressing enter? you might have then run across the 'shutdown" command, and guess what that does? it SHUTS DOWN the system! WOW!

    you put the commands into a file. make the file executable. then run it.

    putting two lines into a text file isnt 'programming"
    wow just exactly do you think im asking for i know how to shutdown via termianl on debian systems sudo shutdown now.

    what i was asking for was how do you combine the two commands in such a way that the shutdown command is issued after a successful update.

    not to be condasended i find your attitude offensive because if i was a newcomer for the first time after reading your reply i wouldn't join because id be thinking everyone is like that

    Sent from my WAS-LX1A using Tapatalk

  4. $spacer_open
    $spacer_close
  5. #4
    Quote Originally Posted by gillibrand20 View Post
    wow just exactly do you think im asking for i know how to shutdown via termianl on debian systems sudo shutdown now.
    if you knew why did you first post say 'im not sure how to properly shut down the system via terminal."? or do you think no one can read things youve posted before?
    what i was asking for was how do you combine the two commands in such a way that the shutdown command is issued after a successful update.
    guess you missed the millions of bash scripting tutorials on the internet, then. heres a handy guide:
    • put the update command FIRST
    • put the shutdown command SECOND

    guess what happens? the first command runs FIRST and the second command runs AFTER it. hope your years of programming have prepared you for that.
    not to be condasended i find your attitude offensive because if i was a newcomer for the first time after reading your reply i wouldn't join because id be thinking everyone is like that

    Sent from my WAS-LX1A using Tapatalk
    what does 'condasended" mean? cant find that word in the dictionary, or is it more of the way your going to 'wright" (did you mean WRITE?) a script? and if you dont like it go to another forum where theyll babysit you.

    and did you even try to read about dnf? might want to pay close attention to the 'reboot" flag. take a guess as to what that does after the update?
    https://fedoraproject.org/wiki/DNF_system_upgrade
    Last edited by habit; 1 Week Ago at 07:01 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •