Ubuntu12.04 Server configuration record 1. single NIC with Single IP (common) vi/etc/network/interface auto eth0 iface eth0 inet static address IP netmask subnet mask gateway open file/etc/network/interfaces, make sure that The Network Manager is not enabled (see The preceding figure) and configure The following content: [html] # The loopback network interface (configure The loopback interface) auto lo # activate The lo interface iface lo inet loopback # configure The lo interface as The loopback interface # The primary network interface (configure The main network interface) auto eth0 # enable the eth0 interface iface eth0 inet static # configure the eth0 interface Static IP address 10.16.3.99 netmask 255.255.255.0 network 10.16.3.0 broadcast 10.16.3.255 gateway 10.16.3.1 method 1 (recommended): Only one command is required for command line installation: sudo apt-get install openssh-server subsequently, ubuntu automatically downloads and installs openssh server, and resolves all dependencies. Method 2: first enter the Ubuntu Software Center through Ubuntu Software Center installation, and then enter "openssh-server" in the search box. Then, openssh-server is displayed in the search result; click "Install" to Install the SDK. Sudo/etc/init. d/ssh start2. then run the following command to view the IP Address: ifconfig. set the IP address. Enter sudo gedit/etc/network/interfaces on the terminal. Assume that the network card is 0. If it is another network card, change eth0 to the corresponding value. Auto loiface lo inet loopback # Use Nic 0 auto eth0 # use static IPiface eth0 inet static # Set IPaddress 172.32.1.11 # Set the subnet mask. Do not make a mistake. You can calculate it by yourself, the specifics may be different, depending on the IP address! Netmask 255.255.255.0.0 # Set gateway 172.32.1.2152. configure DNS. If you need to manually configure the DNS terminal, enter sudo vi/etc/resolv. add the following code to conf (211.153.31.2 for your DNS) nameserver 211.153.31.23. restart the network sudo/etc/init. d/networking restart: after prompting OK, try to ping other machines in the gateway and LAN, and then try again! Pay attention to the differences between the ports of the two NICs. The installation problem is that the plug-in method of the network port is wrong and has nothing to do with the technology .. After installing Ubuntu, I suddenly realized that I didn't set the root password. Without knowing the password, I could not access the root user. I searched the internet and found out why. The Default root Password of Ubuntu is random, that is, a new root password is generated every time you start the system. Enter the sudo passwd command on the terminal, enter the password of the current user, enter, and confirm. The new password is the new root password. After the modification is successful, enter the command su root and then enter the new password. In service networking restart, you need to add sudo ubuntu12.04 in advance to reset the root password when using ubuntu. If you forget the root password, how can you reset it, by default, the latest version of ubuntu enters grub by pressing the shift key when it is started. My previous version of ubuntu11.10 used to change the root password reset method: #1. When the machine is started into grub (Press and hold esc to go to grub), move it to the recovery mode of the second line with the up and down keys, press e (note not press Enter) #2. Add rw init =/bin/bash to the last line of linux/boot/vmlinuz, or (rw single init =/bin/bash) (remove the one after ro in short) and press ctrl + x or press F10 to enter; #3. Enter the single user mode, you can do whatever you want. (The command for modifying the root password is passwd root. Then, enter your new password, press ctrl + alt + delete to restart the CMK. (I tried to shut down the instance by using a command. I can only use this command to restart the instance ). The method for ubuntu's latest version 12.04 is: (this method is theoretically feasible, but it fails to pass in version 12.04, and give root password for maintainer is reported) #1. It is the same as the previous step. #2. Press Ctrl + x to enter the recovery menu, select drop to root shell, and change the root password. When changing the root password, the system may prompt "Authentication Manipulation error". At this time, enter the following command: mount-rw-o remount /, next, change the password again. If you forget the password of ubuntu or the password is broken, how can this problem be solved? (this method is feasible in this version) 1. When the Grub interface appears, press "Esc" to enter grub: ubunt 8.04.1, kernel 2.6.24-19-generic ubunt 8.04.1, kernel 2.6.24-19-generic (recovery mode) ubunt 8.04.1, MeMtest86 + 2, select "ubunt 8.04.1, kernel 2.6.24-19-generic (recovery mode)" on the second line, and press "Enter" to Enter the Recovery Menu: resume normal boo T dpkg repair broken packages root drop to root shell prompt xfix try to fix x server 3, select "root drop to root shell prompt", Press "Enter" and then the prompt is displayed: root @ QA-desktop :~ # You can use passwd to generate a new password. root @ QA-desktop :~ # Passwd root Enter new password: Retype new password: passwd: password updated successfully root @ QA-desktop :~ # Then reboot takes effect.