Xref: utzoo comp.unix.questions:30708 comp.unix.misc:1352 comp.unix.sysv386:7277 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!uupsi!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: comp.unix.questions,comp.unix.misc,comp.unix.sysv386 Subject: Re: Current Run-Level: How can you tell? Keywords: init run level Message-ID: <3WYAY42@xds13.ferranti.com> Date: 24 Apr 91 22:52:48 GMT References: <1991Apr23.024433.10460@srwic.UUCP> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Organization: Xenix Support, FICC Lines: 19 In article <1991Apr23.024433.10460@srwic.UUCP> sralston@srwic.UUCP (Steve Ralston) writes: > Sorry as I'm sure this is a FAQ or RTFM question, but, I've looked quite > a few places and can't find a way to tell what the current run level of > a Unix system is (i.e. "init" level). Assuming you're using System V (which is the only place I know of run levels in anyway)... % who -r . run-level 3 Apr 22 08:26 3 0 S % Bobs-your-uncle! In C, you could easily grovel through /etc/utmp if you don't want to fork a popen. -- Peter da Silva. `-_-' peter@ferranti.com +1 713 274 5180. 'U` "Have you hugged your wolf today?"