Colinux installation and Network Configuration

Source: Internet
Author: User
Tags ssh secure shell
There are three main methods to simulate a Linux environment on Windows:
1. VMware and other virtual machines. Disadvantages: high system resources occupation and slow operation speed
2. cygwin and other simulated environments. Program Simulate the implementation of functions in Linux. Disadvantages: it is different from the actual Linux environment, and the function simulation is incomplete, which is prone to conflicts.
3. colinux/andlinux and other simulated environments. by using a special driver, the simulated environment can run in ring0 privileged mode and use the CPU in turn with windows, in this way, running the simulation environment is like running a local system. The speed is very fast and the stability is good.

I. colinux Installation
First download the colinux Installation File, go to http://www.colinux.org/download
By default, the installation directory is c: \ colinux, so many configurations do not need to be modified. Choose not to download the file system
Then go to the next file system on the website and select the appropriate kernel version. After downloading the file, decompress the package to the colinux installation directory (you can also put it in another directory and modify the corresponding configuration). In this example, choose ubuntu6.0.
Copy example. conf and change it to Ubuntu. conf. Open it and modify the file name of the file system:
Cobd0 = "C: \ colinux \ Ubuntu-6.06.1.ext3.1gb"
To increase colinux memory, you can modify the mem option:
Mem = 256
Then open the console, go to c: \ colinux, and enter the command:
Colinux-daemon.exe @ ubuntu. conf
Enter the username root and password root to run colinux.

It is best to write a batch file start. BAT and write the above command to the batch file, so that you can double-click to start colinux.

Ii. File Sharing with Windows

To share a folder in windows, add:
Cofs0 = c: \ colinux
Cofs1 = D: \ colinux
The number after cofs can be increased.
Then enter the following command in colinux:
Mount-T cofs 0/mnt/share
In this way, the c: \ colinux folder is mapped to the/mnt/share directory.

3. colinux Network Configuration

After colinux is installed, a virtual network card is automatically installed. Right-click the network neighbor and you will find an additional "local connection 2 ".
The following describes how to configure colinux to share the Internet with windows.
1. Rename "local connection 2" to "colinux" (other names can also be used, personal hobbies)
2. Unplug the network cable ( Important. Otherwise, connection sharing cannot be set. )
3. Set Connection Sharing: Right-click "Local Connection", select "advanced", and select "allow other network users to connect through the Internet connection of this computer ". At this time, the IP address connected to colinux is set to 192.168.0.1, which is in conflict with the gateway IP address (if your gateway IP address is 192.168.1.1, this step is not required). Therefore, you can change it to 192.168.1.1. Otherwise, you cannot access the Internet in windows. Disable the local connection and enable it again. This will not affect Windows Internet access.
4. Configure colinux Internet access: Open the conf configuration file of colinux and add the following Configuration:
Eth0 = tuntap, "colinux"
If the configuration of eth0 already exists in the conf file, use # To comment it out.
Tuntap indicates the Internet access mode. "colinux" indicates the name of the network connection in the first step.
Here is a brief introduction of tun/TAP Internet access: Tun and tap are a kernel driver that simulates network devices in user space. When the operating system sends data, it first sends the data to the virtual network device and then to the physical network device. The order of receiving data is the opposite. Tun processes IP packets at the network layer, and tap processes Ethernet frames at the data link layer.
5. Configure the IP address of colinux: Open/etc/Network/interfaces and modify the following content:
# Second network (tap-win32)
Auto eth0
Iface eth0 Inet static
Address 192.168.1.40
Netmask 255.255.255.0
Gateway 192.168.1.1
Note: If you have configured eht0, use # to block it.
6. Configure DNS: Open/etc/resolv. conf and modify it:
Nameserver 202.117.80.3 (DNS)
7. Restart colinux
8. Test whether colinux can access the Internet:
Ping 192.168.1.1 to check whether the gateway can be pinged
Ping www.google.com to check whether DNS has taken effect

If both are successful, you can download and install the development tool:
Apt-Get Update
Apt-Get intalll man installation help (optional)
Apt-Get install gcc
Apt-Get install make
Apt-Get install libc6-dev
After installing the above development tools, you can develop C language programs in colinux.

9. Install Samba (optional)
Using the samba service, you can access colinux files in windows like accessing LAN sharing. The installation process is as follows:
Apt-Get install Samba install SAMBA service
Add a user: useradd user_name.
Add the user to the Samba server: smbpasswd-A user_name.
Edit/etc/samba/smb. conf and add the following content:
[Linux share]
Comment = Linux share docs
Browseable = Yes
Writable = Yes
Create mask = 0775
Path =/root
The path parameter is the directory to be shared with windows.
Restart the Samba server:/etc/rc3.d/s20samba restart.
Enter the network path http://www.cnblogs.com/bigshow/admin/file://192.168.1.40/to access the shared directory in colinux.

10. Install SSH (optional)
SSH is a remote logon protocol similar to telnet. After installation, You can remotely log on to colinux through the SSH client in windows. The installation process is simple:
Apt-Get Install SSH
Then install the SSH client in windows. We recommend that you use SSH Secure Shell or putty. You can remotely log on to colinux by entering the IP address and password of colinux ~

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.