When we enable any service using systemctl, in which runlevel would that service run?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












As far as I know when we boot Linux system the services mentioned in runlevels (rcX.d) would be started.



If we enable any service to start during boot-up using systemctl command then will that service will be added to that default runlevel?







share|improve this question









New contributor




Shrey Kanna is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






















    up vote
    3
    down vote

    favorite












    As far as I know when we boot Linux system the services mentioned in runlevels (rcX.d) would be started.



    If we enable any service to start during boot-up using systemctl command then will that service will be added to that default runlevel?







    share|improve this question









    New contributor




    Shrey Kanna is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.




















      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      As far as I know when we boot Linux system the services mentioned in runlevels (rcX.d) would be started.



      If we enable any service to start during boot-up using systemctl command then will that service will be added to that default runlevel?







      share|improve this question









      New contributor




      Shrey Kanna is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      As far as I know when we boot Linux system the services mentioned in runlevels (rcX.d) would be started.



      If we enable any service to start during boot-up using systemctl command then will that service will be added to that default runlevel?









      share|improve this question









      New contributor




      Shrey Kanna is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited Sep 6 at 23:27









      Kevin Bowen

      13.9k145769




      13.9k145769






      New contributor




      Shrey Kanna is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Sep 6 at 20:31









      Shrey Kanna

      161




      161




      New contributor




      Shrey Kanna is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Shrey Kanna is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Shrey Kanna is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          3
          down vote













          Actually no, it does not but you can run:



          systemctl show -p WantedBy service-name


          to find that in which target it would be run, for example:



          systemctl show -p WantedBy tlp.service 
          WantedBy=multi-user.target


          which indicates that if I enable tlp it would be started when I get into multi-user.target.



          Also worth to mention that run-levels are deprecated and systemd uses target instead:



          ┌─────────┬───────────────────┐
          │Runlevel │ Target │
          ├─────────┼───────────────────┤
          │0 │ poweroff.target │
          ├─────────┼───────────────────┤
          │1 │ rescue.target │
          ├─────────┼───────────────────┤
          │2, 3, 4 │ multi-user.target │
          ├─────────┼───────────────────┤
          │5 │ graphical.target │
          ├─────────┼───────────────────┤
          │6 │ reboot.target │
          └─────────┴───────────────────┘





          share|improve this answer






















          • Thanks for the answer. First of all I wanna say sorry that I didn't get exactly as I'm new to Linux. My doubts are: 1. where are target files stored in ubuntu? 2. why is run level needed when there's a concept of targets? 3. when we enable any service will that service will be added in rcx.d files also? 4. when system boots from where it will fetch the list of services to start? Thank you.
            – Shrey Kanna
            Sep 7 at 6:27


















          up vote
          0
          down vote














          As far as I know when we boot Linux system the services mentioned in runlevels (rcX.d) would be started.




          This is not true anymore.



          The systemd init system does not natively use a concept of run-levels. Instead, it introduces a concept of "targets" which group other units by using the mechanism of dependencies.



          What was a "default runlevel" becomes the default.target unit which, when activated (started), can "pull in" (activate) other units via requirement dependencies.



          (systemd does provide some compatibility layer for the run-level concept, in form of giving some targets aliases with names like runlevelX.target, which are then used by the tools like telinit, but that's about it.
          In systemd, a service or any other unit is not required to belong to any of these pseudo-runlevels.)



          To enable a service (usually) is to create an artificial dependency between two units.



          So, when you enable a service (or any unit), systemd takes a look at that unit's [Install] section and performs actions specified therein. For example, let's take a look at sshd.service on my machine:



          # /usr/lib/systemd/system/sshd.service
          [Unit]
          Description=OpenSSH Daemon
          Wants=sshdgenkeys.service
          After=sshdgenkeys.service
          After=network.target

          [Service]
          ExecStart=/usr/bin/sshd -D
          ExecReload=/bin/kill -HUP $MAINPID
          KillMode=process
          Restart=always

          [Install]
          WantedBy=multi-user.target

          # This service file runs an SSH daemon that forks for each incoming connection.
          # If you prefer to spawn on-demand daemons, use sshd.socket and sshd@.service.


          When you write systemctl enable sshd.service, systemd looks at this unit and adds a Wants= dependency from multi-user.target to sshd.service according to the WantedBy=multi-user.target directive.



          (This dependency is physically stored as a symlink from /etc/systemd/system/multi-user.target.wants to /usr/lib/systemd/system/sshd.service.)



          So, when you boot...



          When you boot, default.target gets activated, along with anything else it pulls in via dependencies. This is called "the initial transaction", and that's it.



          Your default.target is likely an alias to graphical.target (which Wants=multi-user.target) or to multi-user.target directly. Either way, multi-user.target gets activated and pulls in sshd.service via the above-mentioned dependency.






          share|improve this answer






















          • thanks for the answer. I have some doubts please clarify it.1. where are target files stored in ubuntu? 2. why is run level needed when there's a concept of targets? 3. when we enable any service will that service will be added in rcx.d files also? 4. when system boots from where it will fetch the list of services to start? Thank you.
            – Shrey Kanna
            Sep 7 at 6:49










          • @ShreyKanna 1. Alongside other units, see man systemd. 2. It's not. 3. Not necessarily, because enablement is not restricted to WantedBy= from runlevel-mapped targets. 4. When system boots, it starts default.target. Everything else is started by dependency.
            – intelfx
            Sep 7 at 17:11











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          Shrey Kanna is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1072884%2fwhen-we-enable-any-service-using-systemctl-in-which-runlevel-would-that-service%23new-answer', 'question_page');

          );

          Post as a guest






























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote













          Actually no, it does not but you can run:



          systemctl show -p WantedBy service-name


          to find that in which target it would be run, for example:



          systemctl show -p WantedBy tlp.service 
          WantedBy=multi-user.target


          which indicates that if I enable tlp it would be started when I get into multi-user.target.



          Also worth to mention that run-levels are deprecated and systemd uses target instead:



          ┌─────────┬───────────────────┐
          │Runlevel │ Target │
          ├─────────┼───────────────────┤
          │0 │ poweroff.target │
          ├─────────┼───────────────────┤
          │1 │ rescue.target │
          ├─────────┼───────────────────┤
          │2, 3, 4 │ multi-user.target │
          ├─────────┼───────────────────┤
          │5 │ graphical.target │
          ├─────────┼───────────────────┤
          │6 │ reboot.target │
          └─────────┴───────────────────┘





          share|improve this answer






















          • Thanks for the answer. First of all I wanna say sorry that I didn't get exactly as I'm new to Linux. My doubts are: 1. where are target files stored in ubuntu? 2. why is run level needed when there's a concept of targets? 3. when we enable any service will that service will be added in rcx.d files also? 4. when system boots from where it will fetch the list of services to start? Thank you.
            – Shrey Kanna
            Sep 7 at 6:27















          up vote
          3
          down vote













          Actually no, it does not but you can run:



          systemctl show -p WantedBy service-name


          to find that in which target it would be run, for example:



          systemctl show -p WantedBy tlp.service 
          WantedBy=multi-user.target


          which indicates that if I enable tlp it would be started when I get into multi-user.target.



          Also worth to mention that run-levels are deprecated and systemd uses target instead:



          ┌─────────┬───────────────────┐
          │Runlevel │ Target │
          ├─────────┼───────────────────┤
          │0 │ poweroff.target │
          ├─────────┼───────────────────┤
          │1 │ rescue.target │
          ├─────────┼───────────────────┤
          │2, 3, 4 │ multi-user.target │
          ├─────────┼───────────────────┤
          │5 │ graphical.target │
          ├─────────┼───────────────────┤
          │6 │ reboot.target │
          └─────────┴───────────────────┘





          share|improve this answer






















          • Thanks for the answer. First of all I wanna say sorry that I didn't get exactly as I'm new to Linux. My doubts are: 1. where are target files stored in ubuntu? 2. why is run level needed when there's a concept of targets? 3. when we enable any service will that service will be added in rcx.d files also? 4. when system boots from where it will fetch the list of services to start? Thank you.
            – Shrey Kanna
            Sep 7 at 6:27













          up vote
          3
          down vote










          up vote
          3
          down vote









          Actually no, it does not but you can run:



          systemctl show -p WantedBy service-name


          to find that in which target it would be run, for example:



          systemctl show -p WantedBy tlp.service 
          WantedBy=multi-user.target


          which indicates that if I enable tlp it would be started when I get into multi-user.target.



          Also worth to mention that run-levels are deprecated and systemd uses target instead:



          ┌─────────┬───────────────────┐
          │Runlevel │ Target │
          ├─────────┼───────────────────┤
          │0 │ poweroff.target │
          ├─────────┼───────────────────┤
          │1 │ rescue.target │
          ├─────────┼───────────────────┤
          │2, 3, 4 │ multi-user.target │
          ├─────────┼───────────────────┤
          │5 │ graphical.target │
          ├─────────┼───────────────────┤
          │6 │ reboot.target │
          └─────────┴───────────────────┘





          share|improve this answer














          Actually no, it does not but you can run:



          systemctl show -p WantedBy service-name


          to find that in which target it would be run, for example:



          systemctl show -p WantedBy tlp.service 
          WantedBy=multi-user.target


          which indicates that if I enable tlp it would be started when I get into multi-user.target.



          Also worth to mention that run-levels are deprecated and systemd uses target instead:



          ┌─────────┬───────────────────┐
          │Runlevel │ Target │
          ├─────────┼───────────────────┤
          │0 │ poweroff.target │
          ├─────────┼───────────────────┤
          │1 │ rescue.target │
          ├─────────┼───────────────────┤
          │2, 3, 4 │ multi-user.target │
          ├─────────┼───────────────────┤
          │5 │ graphical.target │
          ├─────────┼───────────────────┤
          │6 │ reboot.target │
          └─────────┴───────────────────┘






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Sep 6 at 20:54

























          answered Sep 6 at 20:41









          Ravexina

          27.4k146594




          27.4k146594











          • Thanks for the answer. First of all I wanna say sorry that I didn't get exactly as I'm new to Linux. My doubts are: 1. where are target files stored in ubuntu? 2. why is run level needed when there's a concept of targets? 3. when we enable any service will that service will be added in rcx.d files also? 4. when system boots from where it will fetch the list of services to start? Thank you.
            – Shrey Kanna
            Sep 7 at 6:27

















          • Thanks for the answer. First of all I wanna say sorry that I didn't get exactly as I'm new to Linux. My doubts are: 1. where are target files stored in ubuntu? 2. why is run level needed when there's a concept of targets? 3. when we enable any service will that service will be added in rcx.d files also? 4. when system boots from where it will fetch the list of services to start? Thank you.
            – Shrey Kanna
            Sep 7 at 6:27
















          Thanks for the answer. First of all I wanna say sorry that I didn't get exactly as I'm new to Linux. My doubts are: 1. where are target files stored in ubuntu? 2. why is run level needed when there's a concept of targets? 3. when we enable any service will that service will be added in rcx.d files also? 4. when system boots from where it will fetch the list of services to start? Thank you.
          – Shrey Kanna
          Sep 7 at 6:27





          Thanks for the answer. First of all I wanna say sorry that I didn't get exactly as I'm new to Linux. My doubts are: 1. where are target files stored in ubuntu? 2. why is run level needed when there's a concept of targets? 3. when we enable any service will that service will be added in rcx.d files also? 4. when system boots from where it will fetch the list of services to start? Thank you.
          – Shrey Kanna
          Sep 7 at 6:27













          up vote
          0
          down vote














          As far as I know when we boot Linux system the services mentioned in runlevels (rcX.d) would be started.




          This is not true anymore.



          The systemd init system does not natively use a concept of run-levels. Instead, it introduces a concept of "targets" which group other units by using the mechanism of dependencies.



          What was a "default runlevel" becomes the default.target unit which, when activated (started), can "pull in" (activate) other units via requirement dependencies.



          (systemd does provide some compatibility layer for the run-level concept, in form of giving some targets aliases with names like runlevelX.target, which are then used by the tools like telinit, but that's about it.
          In systemd, a service or any other unit is not required to belong to any of these pseudo-runlevels.)



          To enable a service (usually) is to create an artificial dependency between two units.



          So, when you enable a service (or any unit), systemd takes a look at that unit's [Install] section and performs actions specified therein. For example, let's take a look at sshd.service on my machine:



          # /usr/lib/systemd/system/sshd.service
          [Unit]
          Description=OpenSSH Daemon
          Wants=sshdgenkeys.service
          After=sshdgenkeys.service
          After=network.target

          [Service]
          ExecStart=/usr/bin/sshd -D
          ExecReload=/bin/kill -HUP $MAINPID
          KillMode=process
          Restart=always

          [Install]
          WantedBy=multi-user.target

          # This service file runs an SSH daemon that forks for each incoming connection.
          # If you prefer to spawn on-demand daemons, use sshd.socket and sshd@.service.


          When you write systemctl enable sshd.service, systemd looks at this unit and adds a Wants= dependency from multi-user.target to sshd.service according to the WantedBy=multi-user.target directive.



          (This dependency is physically stored as a symlink from /etc/systemd/system/multi-user.target.wants to /usr/lib/systemd/system/sshd.service.)



          So, when you boot...



          When you boot, default.target gets activated, along with anything else it pulls in via dependencies. This is called "the initial transaction", and that's it.



          Your default.target is likely an alias to graphical.target (which Wants=multi-user.target) or to multi-user.target directly. Either way, multi-user.target gets activated and pulls in sshd.service via the above-mentioned dependency.






          share|improve this answer






















          • thanks for the answer. I have some doubts please clarify it.1. where are target files stored in ubuntu? 2. why is run level needed when there's a concept of targets? 3. when we enable any service will that service will be added in rcx.d files also? 4. when system boots from where it will fetch the list of services to start? Thank you.
            – Shrey Kanna
            Sep 7 at 6:49










          • @ShreyKanna 1. Alongside other units, see man systemd. 2. It's not. 3. Not necessarily, because enablement is not restricted to WantedBy= from runlevel-mapped targets. 4. When system boots, it starts default.target. Everything else is started by dependency.
            – intelfx
            Sep 7 at 17:11















          up vote
          0
          down vote














          As far as I know when we boot Linux system the services mentioned in runlevels (rcX.d) would be started.




          This is not true anymore.



          The systemd init system does not natively use a concept of run-levels. Instead, it introduces a concept of "targets" which group other units by using the mechanism of dependencies.



          What was a "default runlevel" becomes the default.target unit which, when activated (started), can "pull in" (activate) other units via requirement dependencies.



          (systemd does provide some compatibility layer for the run-level concept, in form of giving some targets aliases with names like runlevelX.target, which are then used by the tools like telinit, but that's about it.
          In systemd, a service or any other unit is not required to belong to any of these pseudo-runlevels.)



          To enable a service (usually) is to create an artificial dependency between two units.



          So, when you enable a service (or any unit), systemd takes a look at that unit's [Install] section and performs actions specified therein. For example, let's take a look at sshd.service on my machine:



          # /usr/lib/systemd/system/sshd.service
          [Unit]
          Description=OpenSSH Daemon
          Wants=sshdgenkeys.service
          After=sshdgenkeys.service
          After=network.target

          [Service]
          ExecStart=/usr/bin/sshd -D
          ExecReload=/bin/kill -HUP $MAINPID
          KillMode=process
          Restart=always

          [Install]
          WantedBy=multi-user.target

          # This service file runs an SSH daemon that forks for each incoming connection.
          # If you prefer to spawn on-demand daemons, use sshd.socket and sshd@.service.


          When you write systemctl enable sshd.service, systemd looks at this unit and adds a Wants= dependency from multi-user.target to sshd.service according to the WantedBy=multi-user.target directive.



          (This dependency is physically stored as a symlink from /etc/systemd/system/multi-user.target.wants to /usr/lib/systemd/system/sshd.service.)



          So, when you boot...



          When you boot, default.target gets activated, along with anything else it pulls in via dependencies. This is called "the initial transaction", and that's it.



          Your default.target is likely an alias to graphical.target (which Wants=multi-user.target) or to multi-user.target directly. Either way, multi-user.target gets activated and pulls in sshd.service via the above-mentioned dependency.






          share|improve this answer






















          • thanks for the answer. I have some doubts please clarify it.1. where are target files stored in ubuntu? 2. why is run level needed when there's a concept of targets? 3. when we enable any service will that service will be added in rcx.d files also? 4. when system boots from where it will fetch the list of services to start? Thank you.
            – Shrey Kanna
            Sep 7 at 6:49










          • @ShreyKanna 1. Alongside other units, see man systemd. 2. It's not. 3. Not necessarily, because enablement is not restricted to WantedBy= from runlevel-mapped targets. 4. When system boots, it starts default.target. Everything else is started by dependency.
            – intelfx
            Sep 7 at 17:11













          up vote
          0
          down vote










          up vote
          0
          down vote










          As far as I know when we boot Linux system the services mentioned in runlevels (rcX.d) would be started.




          This is not true anymore.



          The systemd init system does not natively use a concept of run-levels. Instead, it introduces a concept of "targets" which group other units by using the mechanism of dependencies.



          What was a "default runlevel" becomes the default.target unit which, when activated (started), can "pull in" (activate) other units via requirement dependencies.



          (systemd does provide some compatibility layer for the run-level concept, in form of giving some targets aliases with names like runlevelX.target, which are then used by the tools like telinit, but that's about it.
          In systemd, a service or any other unit is not required to belong to any of these pseudo-runlevels.)



          To enable a service (usually) is to create an artificial dependency between two units.



          So, when you enable a service (or any unit), systemd takes a look at that unit's [Install] section and performs actions specified therein. For example, let's take a look at sshd.service on my machine:



          # /usr/lib/systemd/system/sshd.service
          [Unit]
          Description=OpenSSH Daemon
          Wants=sshdgenkeys.service
          After=sshdgenkeys.service
          After=network.target

          [Service]
          ExecStart=/usr/bin/sshd -D
          ExecReload=/bin/kill -HUP $MAINPID
          KillMode=process
          Restart=always

          [Install]
          WantedBy=multi-user.target

          # This service file runs an SSH daemon that forks for each incoming connection.
          # If you prefer to spawn on-demand daemons, use sshd.socket and sshd@.service.


          When you write systemctl enable sshd.service, systemd looks at this unit and adds a Wants= dependency from multi-user.target to sshd.service according to the WantedBy=multi-user.target directive.



          (This dependency is physically stored as a symlink from /etc/systemd/system/multi-user.target.wants to /usr/lib/systemd/system/sshd.service.)



          So, when you boot...



          When you boot, default.target gets activated, along with anything else it pulls in via dependencies. This is called "the initial transaction", and that's it.



          Your default.target is likely an alias to graphical.target (which Wants=multi-user.target) or to multi-user.target directly. Either way, multi-user.target gets activated and pulls in sshd.service via the above-mentioned dependency.






          share|improve this answer















          As far as I know when we boot Linux system the services mentioned in runlevels (rcX.d) would be started.




          This is not true anymore.



          The systemd init system does not natively use a concept of run-levels. Instead, it introduces a concept of "targets" which group other units by using the mechanism of dependencies.



          What was a "default runlevel" becomes the default.target unit which, when activated (started), can "pull in" (activate) other units via requirement dependencies.



          (systemd does provide some compatibility layer for the run-level concept, in form of giving some targets aliases with names like runlevelX.target, which are then used by the tools like telinit, but that's about it.
          In systemd, a service or any other unit is not required to belong to any of these pseudo-runlevels.)



          To enable a service (usually) is to create an artificial dependency between two units.



          So, when you enable a service (or any unit), systemd takes a look at that unit's [Install] section and performs actions specified therein. For example, let's take a look at sshd.service on my machine:



          # /usr/lib/systemd/system/sshd.service
          [Unit]
          Description=OpenSSH Daemon
          Wants=sshdgenkeys.service
          After=sshdgenkeys.service
          After=network.target

          [Service]
          ExecStart=/usr/bin/sshd -D
          ExecReload=/bin/kill -HUP $MAINPID
          KillMode=process
          Restart=always

          [Install]
          WantedBy=multi-user.target

          # This service file runs an SSH daemon that forks for each incoming connection.
          # If you prefer to spawn on-demand daemons, use sshd.socket and sshd@.service.


          When you write systemctl enable sshd.service, systemd looks at this unit and adds a Wants= dependency from multi-user.target to sshd.service according to the WantedBy=multi-user.target directive.



          (This dependency is physically stored as a symlink from /etc/systemd/system/multi-user.target.wants to /usr/lib/systemd/system/sshd.service.)



          So, when you boot...



          When you boot, default.target gets activated, along with anything else it pulls in via dependencies. This is called "the initial transaction", and that's it.



          Your default.target is likely an alias to graphical.target (which Wants=multi-user.target) or to multi-user.target directly. Either way, multi-user.target gets activated and pulls in sshd.service via the above-mentioned dependency.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Sep 7 at 0:41

























          answered Sep 7 at 0:34









          intelfx

          24515




          24515











          • thanks for the answer. I have some doubts please clarify it.1. where are target files stored in ubuntu? 2. why is run level needed when there's a concept of targets? 3. when we enable any service will that service will be added in rcx.d files also? 4. when system boots from where it will fetch the list of services to start? Thank you.
            – Shrey Kanna
            Sep 7 at 6:49










          • @ShreyKanna 1. Alongside other units, see man systemd. 2. It's not. 3. Not necessarily, because enablement is not restricted to WantedBy= from runlevel-mapped targets. 4. When system boots, it starts default.target. Everything else is started by dependency.
            – intelfx
            Sep 7 at 17:11

















          • thanks for the answer. I have some doubts please clarify it.1. where are target files stored in ubuntu? 2. why is run level needed when there's a concept of targets? 3. when we enable any service will that service will be added in rcx.d files also? 4. when system boots from where it will fetch the list of services to start? Thank you.
            – Shrey Kanna
            Sep 7 at 6:49










          • @ShreyKanna 1. Alongside other units, see man systemd. 2. It's not. 3. Not necessarily, because enablement is not restricted to WantedBy= from runlevel-mapped targets. 4. When system boots, it starts default.target. Everything else is started by dependency.
            – intelfx
            Sep 7 at 17:11
















          thanks for the answer. I have some doubts please clarify it.1. where are target files stored in ubuntu? 2. why is run level needed when there's a concept of targets? 3. when we enable any service will that service will be added in rcx.d files also? 4. when system boots from where it will fetch the list of services to start? Thank you.
          – Shrey Kanna
          Sep 7 at 6:49




          thanks for the answer. I have some doubts please clarify it.1. where are target files stored in ubuntu? 2. why is run level needed when there's a concept of targets? 3. when we enable any service will that service will be added in rcx.d files also? 4. when system boots from where it will fetch the list of services to start? Thank you.
          – Shrey Kanna
          Sep 7 at 6:49












          @ShreyKanna 1. Alongside other units, see man systemd. 2. It's not. 3. Not necessarily, because enablement is not restricted to WantedBy= from runlevel-mapped targets. 4. When system boots, it starts default.target. Everything else is started by dependency.
          – intelfx
          Sep 7 at 17:11





          @ShreyKanna 1. Alongside other units, see man systemd. 2. It's not. 3. Not necessarily, because enablement is not restricted to WantedBy= from runlevel-mapped targets. 4. When system boots, it starts default.target. Everything else is started by dependency.
          – intelfx
          Sep 7 at 17:11











          Shrey Kanna is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          Shrey Kanna is a new contributor. Be nice, and check out our Code of Conduct.












          Shrey Kanna is a new contributor. Be nice, and check out our Code of Conduct.











          Shrey Kanna is a new contributor. Be nice, and check out our Code of Conduct.













           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1072884%2fwhen-we-enable-any-service-using-systemctl-in-which-runlevel-would-that-service%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          Long meetings (6-7 hours a day): Being “babysat” by supervisor

          Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

          Confectionery