Sponsored Content
Operating Systems Solaris difference between init and shutdown Post 302338311 by Scott on Monday 27th of July 2009 02:46:58 PM
Old 07-27-2009
Init is also more flexible for switching run-levels... as I have to do because "startx" doesn't work on my Linux - gives some blah blah error about something. Being too lazy to fix it, I use "init 5" instead, which works just fine! (that's my Linux - init 5 means different things on different Unix's).

---------- Post updated at 08:46 PM ---------- Previous update was at 08:08 PM ----------

(actually, slightly inaccurate: init isn't more flexible (because you can specify a new run-level using shutdown) - but it's simpler to use init sometimes)
 

10 More Discussions You Might Find Interesting

1. Solaris

difference b/w halt shutdown

Hi, I want to know the difference between halt and shutdown commands and which is better to use? Regards, visu (2 Replies)
Discussion started by: visu_ak
2 Replies

2. AIX

Difference between "shutdown" and "shutdown -h" ?

Hi, What is the difference between those two ? thanks Vilius (1 Reply)
Discussion started by: vilius
1 Replies

3. Linux

How to I change init levels after typing init 1

Dear all, I typed in init 1 on my redhat box as root and according to wikipedia (http://en.wikipedia.org/wiki/Runlevel): 1 Single-User Mode Does not configure network interfaces, start daemons, or allow non-root logins So now I can't connect back to it. How do I change the init back to 3?... (8 Replies)
Discussion started by: z1dane
8 Replies

4. Red Hat

Difference between 'init s' and 'init 1'

What is the difference between 'init s' and 'init 1'. I know that both will work to change the current run level to single user mode. Is there any difference in those two commands? (5 Replies)
Discussion started by: praveen_b744
5 Replies

5. Solaris

Difference between run level & init level

what are the major Difference Between run level & init level (2 Replies)
Discussion started by: rajaramrnb
2 Replies

6. UNIX for Dummies Questions & Answers

Script to force Oracle database shutdown when shutdown immediate does not work

I have Oracle 9i R2 on AIX 5.2. My Database is running in shared server mode (MTS). Sometimes when I shutdown the database it shutsdown cleanly in 4-5 mints and sometimes it takes good 15-20 minutes and then I get some ora-600 errors and only way to shutdown is by opening another session and... (7 Replies)
Discussion started by: aixhp
7 Replies

7. Red Hat

The difference between init.d and xinit.d dir ...

What's the difference between the two. I've seen xinit.d directory not always but on some systems. (1 Reply)
Discussion started by: Praveen_218
1 Replies

8. Red Hat

init-script failing because of /etc/rc.d/init.d/functions

I encountered a problem on one of our database servers. OS: CentOS 5.5 final Kernel: 2.6.18-238.5.1.el5.028stab085.2 (OpenVZ kernel) We wrote some DB-Start/Stop-scripts ("/db2/admin/scripts_dba/start_services.ksh" and ".../stop_services.ksh") to start the database instances. (Database... (1 Reply)
Discussion started by: bakunin
1 Replies

9. Red Hat

Difference b/w init s and init1 in red hat linux?

Hi, Guys can any one explain me the difference between init s and init 1 in linux? this would be very useful.... thanx in advance.. regards Amandeep (3 Replies)
Discussion started by: aman.singh2886
3 Replies

10. UNIX for Beginners Questions & Answers

No init messages display during startup/shutdown

This question is more in the line of how init messages get sent to a console during startup/shutdown. My problem has to do with exporting a VM from AWS to KVM (and a retry on virtual box). I am looking for a understanding on how init messages are sent to a device and what controls them My two... (0 Replies)
Discussion started by: jtkells
0 Replies
init(8) 						      System Manager's Manual							   init(8)

NAME
init - Process control initialization SYNOPSIS
/sbin/init [0123456789MmQqSs] DESCRIPTION
The init program initializes the system by creating and controlling processes. The processes run by init at each run level are defined in the inittab file. The init program reads and processes the entries in the inittab file. The init program considers the system to be in a run level at any given time; each run level has a specific group of processes that run at that level. The init program operates in one of eleven run levels: 0-9 and Ss. Of these, only 0, s, 2, and 3 are configured in the inittab file by default. The run level changes when a privileged user invokes init. The new init sends appropriate signals to the original init that tell it which run level to change to. Running the init program is the last step in the boot process after the root file system is mounted. The init program scans the inittab file and looks for an entry with the initdefault keyword. If the entry is there, init uses the run level specified in that entry as the initial run level to enter. If the entry is not found in the inittab file or if the inittab file does not exist, init requests that the user enter a run level from the system console, /dev/console. If the user enters the letter s, init enters single user state, assigns the virtual console terminal to the user's terminal and opens it for reading and writing. The su command is invoked and the system displays a message on the console stating the location of the virtual console. To change the run level, the user specifies either the 0, 2, 3, or s flag. For the first post-boot execution of init to a run level other than single user, it searches the inittab file for entries at the new run level that have the boot or bootwait keywords. If the run level that is specified matches the entry, the init program acts on these entries before processing other entries in the inittab file. Any special initialization of the system, such as checking and mounting file systems, takes place before users are allowed on the system. The init program then scans the inittab file to find all entries that are to be handled for that level. Before starting a new process, init reads each entry in the inittab file, and for each entry that should be respawned, init forks a child process. After spawning all required processes, init waits for one of its descendant processes to stop, a power-fail signal, or a signal that it should change the run level. If one of the preceding three conditions occurs, init reexamines the inittab file. You can add new entries to the inittab file, but init does not reexamine the file until one of the three previous conditions actually occurs. To immedi- ately reexamine the inittab file, invoke the init program with the q flag. FLAGS
Shuts down and halts the system. Changes the run level to a multiuser state with local processes and daemons. Changes the run level to a multiuser state with remote processes and daemons. Changes run level to that specified by the number flag in the /etc/inittab file. If no such entry exists, no action is taken and no message is output. Moves control to the console device and halts to single-user mode. Forces init to reexamine the entries in the inittab file and terminates any live processes which have had their configuration entries removed from /etc/inittab. Users should be aware that when a getty(8) line has been removed from /etc/inittab, and a login shell is active on the ter- minal line that was formerly designated in inittab as a getty entry, the login shell will be killed. Changes the run level to a single user state with only the essential kernel services. FILES
Specifies the command path Specifies the init command control file Specifies the permanent login accounting file RELATED INFORMATION
Commands: getty(8), rc0(8), rc2(8), rc3(8), shutdown(8) Calls: kill(2), reboot(2) Files: inittab(4) delim off init(8)
All times are GMT -4. The time now is 08:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy