LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-03-2007, 07:32 AM   #1
isolvesystems
LQ Newbie
 
Registered: Oct 2007
Posts: 4

Rep: Reputation: 0
Single User mode


Hello,
Am I right that Single user mode uses the least amount of system resources because it is in text and no extra processes are running.

In Ubuntu, may I know how do I automatically enable SSH Server when I use "init 1" to get into Single user mode?

Thanks.
 
Old 10-03-2007, 07:35 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
you can't... "single user mode" does not support networking at any level. if you are looking to free up resources, you could personalise an alternative runlevel, e.g. 4 to suit your needs if you want multiple "modes" of run.
 
Old 10-03-2007, 08:03 AM   #3
isolvesystems
LQ Newbie
 
Registered: Oct 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Where and how do I personalize an alternative runlevel in Ubuntu? Thanks.



Quote:
Originally Posted by acid_kewpie View Post
you can't... "single user mode" does not support networking at any level. if you are looking to free up resources, you could personalise an alternative runlevel, e.g. 4 to suit your needs if you want multiple "modes" of run.
 
Old 10-03-2007, 10:19 AM   #4
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Older: Coherent, MacOS, Red Hat, Big Iron IXs: AIX, Solaris, Tru64
Posts: 2,741

Rep: Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547
Quote:
Originally Posted by isolvesystems View Post
In Ubuntu, may I know how do I automatically enable SSH Server when I use "init 1" to get into Single user mode?
Single-user mode is normally used for system maintenance tasks such as repairing filesystems and the like so I can't imagine why you'd want someone to be able to connect while you're in the middle of that, but if you really wanted to, you could switch to single-user and manually run the startup scripts until you had a configuration that had basic networking up and running. I'd guess that you'd want to go into /etc/rc.d/rc3.d (on SUSE, anyway) and run all the "K" scripts and then run the "S" scripts in order until you got networking started. (On SUSE this would be S05network.) You're definitely not going to be in single-user mode any more and you won't be quite up to level 3. At that point you could try starting the sshd daemon.

Another thing you might need to do is to make sure that /dev/pts is mounted. It's been a while but seem to recall that that needed to be mounted in order for remote logins to work. (I'd test that but I'm in the middle of testing something and don't want to risk messing it up. )

Good luck...
 
Old 10-03-2007, 03:58 PM   #5
Samotnik
Member
 
Registered: Jun 2006
Location: Belarus
Distribution: Debian GNU/Linux testing/unstable
Posts: 471

Rep: Reputation: 40
There is a bad idea to modify single-user mode.
Better modify any other runlevel (e.g. second) for your needs. You can do this by switching to /etc/rc2.d directory and placing the start links to /etc/init.d/networking, /etc/init.d/ssh and others needed by you daemons; and the stop links to all daemons you don't need.
 
Old 10-03-2007, 08:05 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 18,165

Rep: Reputation: 2680Reputation: 2680Reputation: 2680Reputation: 2680Reputation: 2680Reputation: 2680Reputation: 2680Reputation: 2680Reputation: 2680Reputation: 2680Reputation: 2680
Sounds like you should use runlevel 3 (in /etc/inittab) and then disable any daemons/services you don't need.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Single user or multi-user mode? hyphae Slackware 3 01-26-2007 10:52 AM
single user mode... navaladi Mandriva 2 12-26-2004 02:41 AM
single user mode in GRUB isaac_linux Linux - General 1 04-03-2004 09:27 AM
single user mode ? wr3ck3d Slackware 5 03-29-2003 09:52 AM
What is single-user mode?? rbanonuevo Linux - Newbie 4 01-28-2002 12:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration