Results 1 to 7 of 7

Thread: how to set/change runlevel using systemd/systemctl???

  1. #1

    Default how to set/change runlevel using systemd/systemctl???

    Hi Everybody!

    I'm learning about systemd/systemctl and one of the first thing I was wondering is how to change or set to runlevel 3 (from runlevel 5) and then change it back???

    so far what I have found are some symbolic links and files in /lib/systemd/system called
    runlevel0.target -> poweroff.target
    runlevel2.target -> multi-user.target
    runlevel3.target -> multi-user.target
    runlevel4.target -> multi-user.target
    runlevel5.target -> graphical.target
    runlevel6.target -> reboot.target

    thanks in advance!!! :-)

  2. #2
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,500
    Blog Entries
    48

    Smile Re: how to set/change runlevel using systemd/systemctl???

    Quote Originally Posted by juanp_1982 View Post
    Hi Everybody!

    I'm learning about systemd/systemctl and one of the first thing I was wondering is how to change or set to runlevel 3 (from runlevel 5) and then change it back???

    so far what I have found are some symbolic links and files in /lib/systemd/system called
    runlevel0.target -> poweroff.target
    runlevel2.target -> multi-user.target
    runlevel3.target -> multi-user.target
    runlevel4.target -> multi-user.target
    runlevel5.target -> graphical.target
    runlevel6.target -> reboot.target

    thanks in advance!!! :-)
    The init 3 and init 5 commands still work as expected in openSUSE 12.1. To close down your desktop and end up and a terminal prompt open a terminal session and enter:

    Code:
    sudo /sbin/init 3
    Once the desktop has closed down, I often must press the enter key to get a terminal prompt login. Once you are done loading your drivers or what ever, logout as root and login as you. Then execute the command:

    Code:
    sudo /sbin/init 5
    And log back into the desktop as normal. Did you know you can use my fastboot program to switch to run level 3 as well? Check out my blog on how fastboot works...

    FastBoot for Grub Legacy Menu using Kexec - Version 1.32 - Blogs - openSUSE Forums

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  3. #3

    Default Re: how to set/change runlevel using systemd/systemctl???

    thanks James excelent script!!!!!!! :-) the Idea of using systemd/systemctl is the same as the other post (mounting a USB memory), right now I'm cheking the links that you gave me!

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,941
    Blog Entries
    4

    Default Re: how to set/change runlevel using systemd/systemctl???

    You might find this cheatsheet from the Fedora project useful.

    SysVinit to Systemd Cheatsheet - FedoraProject

  5. #5

    Default Re: how to set/change runlevel using systemd/systemctl???

    Quote Originally Posted by ken_yap View Post
    You might find this cheatsheet from the Fedora project useful.

    SysVinit to Systemd Cheatsheet - FedoraProject
    ken_yap thanks!!!!! this is very very useful!!! :-)

  6. #6
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    10,162

    Default Re: how to set/change runlevel using systemd/systemctl???

    I remember stumbling across this cheatsheet once before - now I've bookmarked it for future reference.

  7. #7

    Default Re: how to set/change runlevel using systemd/systemctl???

    Quote Originally Posted by metehyi View Post
    Hi
    try with : Yast2 --> System Services (Runlevels) --> Expert Mode

    should work
    Hi metehyi

    I think that solution use SysVinit in the background, in the link that ken_yap gave us says:
    Code:
    systemctl reboot
    systemctl poweroff
    to set runlevel 5 and 3 we should modify a symbolic link to point a specific target

    Target symbolic link
    ----------------------------------------------------------------------------------------------------------------
    ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target (runlevel 5)
    ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target (runlevel 3)

Posting Permissions

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