LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux CLI distro in virtual machine (https://www.linuxquestions.org/questions/linux-newbie-8/linux-cli-distro-in-virtual-machine-906206/)

shojen 10-03-2011 12:23 PM

Linux CLI distro in virtual machine
 
Hello All,

I've read some posts about installing CLI only distros. However I am trying to install the CLI from a virtual machine. It seems that I am missing something during the install process as I do not get an option to select no X windows or graphics. Alternatively, once the VM boots to Fedora Linux, I can edit the systemd file as instructed but upon reboot it still boots into graphics mode.

I need a CLI only Linux within a virtual machine.

Please, explicit instructions if possible.

Thanks!

TobiSGD 10-03-2011 12:26 PM

Install Debian and deselect the "Desktop" option when it comes to software selection.
Alternatively, install Slackware and deselect X, XAP and KDE when it comes to software selection.

sycamorex 10-03-2011 12:28 PM

Hi and welcome to LQ.

You can tell Fedora to boot to CLI by editing /etc/inittab

You should find the following line
id:5:initdefault:

Change it to look like that:

id:3:initdefault:

It'll boot to runlevel 3 (which doesn't start X)

shojen 10-03-2011 12:35 PM

Thank you for the quick replies:

@sycamorex - I did that, which Fedora quickly tells you that the inittab is not used anymore to define runlevels. Fedora uses a new systemd file that uses .target files instead that supposedly accomplish the same thing. However, using the method you mention and the newer method, neither works within the virtual machine environment.

@TobiSGD - I will try Debian and give an update.

Mr. Alex 10-03-2011 12:38 PM

Quote:

Originally Posted by shojen (Post 4488942)
I need a CLI only Linux within a virtual machine.

Arch Linux is one for this purpose. It has no GUI after installation.

sycamorex 10-03-2011 12:39 PM

Quote:

Originally Posted by shojen (Post 4488950)
Thank you for the quick replies:

@sycamorex - I did that, which Fedora quickly tells you that the inittab is not used anymore to define runlevels. Fedora uses a new systemd file that uses .target files instead that supposedly accomplish the same thing. However, using the method you mention and the newer method, neither works within the virtual machine environment.

Apologies for it. I should've checked it before. I haven't used Fedora for a long time. I don't think it matters whether you're using it on a real computer or in a virtual environment - whatever up-to-date method you used, it should work.

What steps did you take?

edit: Additionally, it's easy to do it in Slackware. Even though you install X, by default it boots to CLI.

repo 10-03-2011 12:51 PM

http://grml.org/

Kind regards

shojen 10-03-2011 12:56 PM

@Mr. Alex - Thank you. I will try Arch Linux if Debian doesn't met my needs. However, so far, it seems to be doing what I want...

@sycamorex - No worries! :) Things change all the time. During the run of the VM it asks for the .iso of the OS you want to use. I chose the appropriate Fedora distro. During the normal installation I pressed the ESC key to get to the boot menu. From that menu I did not see anything as to options for CLI or disabling GUI. I continued with normal install and within Fedora GUI windows, opened a terminal and proceeded to edit the appropriate file. I had to edit my permissions to administrator to be able to sudo. After successfully editing the .target file and copying it as default.target, I restarted the VM and OS. Fedora then rebooted exactly as it did the first time into GUI windows.

Thanks!


All times are GMT -5. The time now is 03:21 PM.