Questions tagged [startup]

The startup sequence, from the time the kernel goes live to when all services are up and running.

Use this tag for questions about the system startup sequence after the kernel is loaded. Contrast with , which covers what happens before the kernel is loaded.

While the details vary greatly from distribution to distribution, the typical sequence goes like this:

  • The kernel initializes drivers and mounts the root partition.
  • The kernel runs the init program, which triggers subsequent stages.
  • Startup-time setup is performed, such as mounting filesystems other than root, configuring some hardware devices, bringing up the network, etc.
  • Daemons are started for network services, logging and monitoring, etc.
  • Login prompts are shown on the console.
757 questions
455
votes
3 answers

What should/shouldn't go in .zshenv, .zshrc, .zlogin, .zprofile, .zlogout?

I'm looking for guidelines on what one should and should not include in the various startup files for zsh. I understand the order of sourcing of these files, and the conditions under which they are sourced, but it is still not clear to me what…
kjo
  • 14,779
  • 25
  • 69
  • 109
95
votes
4 answers

Purpose and typical usage of /etc/rc.local

The header looks like this: #!/bin/sh -e # # rc.local - executed at the end of each multiuser runlevel # # Make sure that the script will "exit 0" on success or any other # value on error. What is the reason for this file (it does not contain…
Emanuel Berg
  • 6,763
  • 7
  • 43
  • 65
91
votes
5 answers

i3wm : start applications on specific workspaces when i3 starts

How can I start applications on specific workspaces in i3 when it starts? Why is this not working in my config file? : workspace 1; exec firefox; workspace 2; exec chromium; workspace 1
Gradient
  • 3,579
  • 10
  • 31
  • 37
86
votes
3 answers

How do services in Debian work, and how can I manage them?

In Windows I have the services manager, where I see all system services, that can be started through Windows itself, I set up the user it uses, the rights management is in there, and I can pass variables and some other information to the services, I…
Erdinc Ay
  • 1,000
  • 1
  • 7
  • 13
63
votes
1 answer

Crash during startup on a recent corporate computer

After some recent updates, my computer no longer boots! Here's what I could determine: This is a very recent computer that was provided to me by corporate IT. It has a recent Intel CPU (Skylake generation). The computer runs Ubuntu 16.04. The…
Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
57
votes
3 answers

Running a script during booting/startup; init.d vs cron @reboot

I am currently trying to understand the difference between init.d and cron @reboot for running a script at startup/booting of the system. The use of @reboot (this method was mentioned in this forum by hs.chandra) is some what simpler, by simply…
3kstc
  • 4,616
  • 15
  • 33
  • 49
48
votes
5 answers

What exactly does init do?

I am creating a linux distro and now I need an init program. I can code in c really well and I know quite a bit about linux (not much but I've been using arch linux for development for 4 years), so I thought I should try writing my own basic init…
DividedByZero
  • 591
  • 1
  • 5
  • 7
46
votes
1 answer

One systemctl command to both start and enable

Using one command to both start and enable systemctl managed software would be useful to spare a few lines in a few scripts, making them a bit more aesthetic (not really a problem but a nice thing to have). Is there one systemctl command to both…
user149572
45
votes
2 answers

systemd: automate modprobe command at boot time

My distribution is Fedora 17 Gnome. Every time I reboot/restart my computer I need to run this command as root: modprobe rt2800usb How can I make it permanent?
somethingSomething
  • 5,721
  • 18
  • 58
  • 98
43
votes
5 answers

How to start an application automatically on boot

I am new to Linux & looking forward to start application (which toggles a led every 10 sec). I have written the application program & it is working fine but now I want to start it automatically on boot. The documentation here says to copy the…
gorge
  • 431
  • 1
  • 4
  • 3
35
votes
8 answers

Stop program running at startup in Linux

How do I stop a program running at startup in Linux. I want to remove some apps from startup to allow them to be managed by supervisord e.g apache2
Frozenskys
  • 707
  • 2
  • 8
  • 12
34
votes
2 answers

When would you use pivot_root over switch_root?

I'm wanting to understand the Linux init process better in order to netboot a system over ceph rather than nfs. In the process I've come across two forms of switching root. One called switch_root, and the other called pivot_root. These scripts…
hookenz
  • 1,207
  • 1
  • 15
  • 19
32
votes
5 answers

Mount root filesystem from initramfs

It's a common scenario. For whatever reason, the initramfs (OpenSUSE, in case it matters) has failed to find the root filesystem, so it drops you into a rescue shell. I know perfectly well what device needs to be mounted though. My question: What is…
MathematicalOrchid
  • 5,664
  • 7
  • 35
  • 62
31
votes
2 answers

What's the difference between /etc/rc.local and /etc/init.d/rc.local?

I want to add a permanent iptables rule to my new VPS, and after brief google search i was surprised that there are two places this rule can be added, that seems like identical: /etc/rc.local and /etc/init.d/rc.local. Maybe someone knows why where…
grigoryvp
  • 413
  • 1
  • 4
  • 6
28
votes
2 answers

How is /etc/fstab accessed before root is mounted?

I was making some changes to /etc/fstab, when this chicken and egg question occurred to me - if /etc/fstab contains the instructions for mounting the file systems, including the root partition, then how does the OS read that file in the first place?
sashoalm
  • 5,760
  • 11
  • 32
  • 47
1
2 3
50 51