Some of the problems that you encounter during the process of using Ubuntu

Source: Internet
Author: User
Tags clear screen ping network

Common basic commands in Ubuntu
----------------------------
$>sudo reboot Restart
$>sudo passwd Root Sets the password for root
$>SU Root Switch Current user


$>ifconfig View IP Address
$>ping www.baidu.com Ping Network
$>clear Clear Screen
$>CD/ETC Switch to a directory
$> CD. Go back to the previous directory
$> CD. Returns the current directory
$>ls-l List all contents of the current folder as columns

Simple editing commands for the Nano
------------------------------------
CTRL + Z Save the changes you made
After you save the Enter file, press ENTER, and then press CTRL+X, you can modify the file and save
Ctrl+x exit, if you modify the file will let you confirm whether to save the changes
Ctrl+k the cursor to the front of a line, cut one line
Ctrl+u Paste a line

Ubuntu Server version garbled solution
----------------------------------------
$>sudo Nano/etc/default/locale
Replace the original Chinese encoding with the following:
Lang= "en_US. UTF-8 "
Language= "En_us:en"
After modifying, save, restart


Installing desktop software in Ubuntu server
---------------------------
Apt-get----->/usr/bin
Property: Update updates the software source
Upgrade Upgrade Package
Install installation package
Remove Remove purge discard, delete software and configuration files
Before you modify the NetEase source, you need to back up the previous sources.list, and then modify
$>sudo MV Sources.list Sources.list.bak
$>sudo Touch Sources.list
1, modify the software source list, here is the source of NetEase,


$>cd/etc/apt/into Apt
$>cat apt See what files are in apt and look for source.list
$>sudo Nano Source.list Edit the source of the software, in the following to join NetEase's source as follows
Deb Http://mirrors.163.com/ubuntu/precise main Universe restricted multiverse
DEB-SRC http://mirrors.163.com/ubuntu/precise main Universe restricted multiverse
Deb Http://mirrors.163.com/ubuntu/precise-security Universe main Multiverse restricted
DEB-SRC http://mirrors.163.com/ubuntu/precise-security Universe main Multiverse restricted
Deb Http://mirrors.163.com/ubuntu/precise-updates Universe main Multiverse restricted
Deb Http://mirrors.163.com/ubuntu/precise-proposed Universe main Multiverse restricted
DEB-SRC http://mirrors.163.com/ubuntu/precise-proposed Universe main Multiverse restricted
Deb Http://mirrors.163.com/ubuntu/precise-backports Universe main Multiverse restricted
DEB-SRC Http://mirrors.163.com/ubuntu/precise-backports Universe main Multiverse restricted
DEB-SRC Http://mirrors.163.com/ubuntu/precise-updates Universe main Multiverse restricted


2. Update the SOFTWARE source
$>cd/usr/bin into the bin directory
$>ls-l listing files in the bin directory
$>sudo apt-get Update Software source
3, upgrade Package
$>apt-get Upgrade
4, search software
$>cd/usr/bin
$>ls-l
$>sudo Apt-cache Search Ubuntu-desktop
5. Install Ubuntu desktop software
$>sudo Apt-get Install Ubuntu-desktop

Install VM Enhancement tool in Ubuntu Server Edition
---------------------------------------------
Role: A. and host shared folders
B. Shared Cut version
C. Support for drag-and-drop between client and host

Procedure: 1, installation Vm-tool
2, automatically open the optical drive software
3, copy vm-tool-xxx.tar.gz to desktop, click Release to Desktop here
4. Open Terminal ctrl+alt+t
5, enter Cd/home/zjf/desktop/vmware-tools-distrib
6, sudo./vmware-install.pl
7. Press ENTER, but you may encounter the following problem:
Searching for a valid kernel header path ...
The path "is not a valid path to the 3.13.0-24-generic kernel headers.
Would is it? [Yes]
WORKAROUND: Re-open a terminal
$>/home/zjf/desktop/vmware-tools-distrib# sudo apt-get install linux-headers-3.13.0-24-generic
Reading Package List ... Complete
Analyzing Dependency tree for Package
Reading status information ... Complete
Linux-headers-3.13.0-24-generic is already the latest version.
Linux-headers-3.13.0-24-generic is set to manual installation.
0 Packages upgraded, 0 new packages installed, 0 packages uninstalled, 0 packages not upgraded
Execute the following command
$>/home/zjf/Desktop/vmware-tools-distrib# sudo-i
$>~# Cd/lib/modules/3.13.0-24-generic/build/include
$>lib/modules/3.13.0-24-generic/build/include# CP./generated/uapi/linux/version.h linux/version.h
8, then install the original, appear enjoy on the installation success

To uninstall the VM Enhancement tool:
1, enter Cd/home/zjf/desktop/vmware-tools-distrib/bin
2,sudo./vmware-uninstall-tools.pl
3,sudo Rm-rvf/usr/lib/vmware-tools


Shared folders: Shared folders between client and host
1, add as shared folder, options, virtual machine settings
2, go to client Cd/mnt/hgfs View shared folder

After you install the VM Enhancement Tool, you may not see a workaround for the shared folder: (the system may not be mounted automatically)
Perform $>sudo apt-get install after reinstalling Tools tool open-vm-dkms
$>sudo mount-t vmhgfs.host://mnt/hgfs
Or: $>cd/home/zjf/desktop/vmware-tools-distrib/bin
$>sudo./vmware config-tools.pl
Delete open-vm-dkms:
$>sudo apt-get Remove open-vm-dkms--purge





Client desktop mode and text mode switching
--------------------------------------------
1.CTRL+ALT+F6//Text mode
2.CTRL+ALT+F7//Desktop mode
Boot into text mode:
A. Modify the/etc/default/grub file, and if you change to text mode, modify the code as follows:
$>cd/etc/default
$>ls-l
$> sudo nano grub
#GRUB_COMDEINE_LINUX_DEFAULT = "quiet"//desktop mode, #表示为隐藏
grub_comdeine_linux_default= "Text"//Text mode
grub_gfxmode=1024x1600//Modify Text mode Resolution
B. Updating Startup items
$>sudo Update-grub

C. Manually enter the graphics mode
$>startx

Client configuration static IP//I have a problem, unable to configure static IP
-------------------------------------------------------
Ubuntu Network connection mode:
A. Bridging: Simulates a physical host, equivalent to a real host,
B.nat: Network address translation, and host form local area network, NAT address translation by host
When there is a network: The client can access the external network and the neighboring client
No network time: Host and client can connect
Vmnet8 and Vmnet1 are virtual network cards
Client access to external network or host is vmnet8.
C.only-host: NAT-like, but no access to external network

1. View the Gateway
Virtual network Edit-->vmnet8-->net--> Gateway: 192.168.44.2
Virtual network Edit-->vmnet8-->dhcp--> network segment: Start: 192.168.44.100
Ends: 192.168.44.254
2, configure static IP
cd/etc/network/
sudo nano interfaces
Go to the interfaces file for editing (it's important to have been mistaken for address:192.168.44.100)
Auto Eth0
Iface eth0 inet Static
Address 192.168.44.100
Netmask 255.255.255.0
Network 192.168.44.0
Broadcast 192.168.44.255
Gateway 192.168.44.2
Dns-nameservers 192.168.44.2
Press CTRL + Z to save Ctrl+x exit
$>CAT interfaces
Restart Network Service: $>/etc/init.d/networking Restart reboot successful static IP configuration succeeded

The configuration of the Ubuntu server from DHCP to static IP (sometimes the situation where static IP cannot be configured may be a bug in the system and need to be removed by DHCP)
Here's the official answer.
1,sudo vi/etc/network/interfaces
The following default configuration will appear for DHCP
Auto Eth0
Iface eth0 inet DHCP
2, we'll change it to a statement to configure the static IP
Auto Eth0
Iface eth0 inet Static
Address 192.168.1.100
Netmask 255.255.255.0
Network 192.168.1.0
Broadcast 192.168.1.255
Gateway 192.168.1.1
Dns-nameservers 192.168.1.1
3. Configure the DNS server by the way
sudo vi/etc/resolv.conf
4, delete DHCP
sudo apt-get remove dhcp-client
5, restart the network service
sudo/etc/init.d/networking restart



Client environment Processing
------------------------------
Change host name to HADOOP01,HADOOP02,HADOOP03
Cd/etc
echo HADOOP01 > Hostname
Hostname

Modify DNS Resolution
/etc$ LS |grep hosts
/etc$ Cat hosts View hosts content
To edit the hosts content:
sudo nano hosts
127.0.0.1 localhost
192.168.44.100 HADOOP01
192.168.44.101 HADOOP02
192.168.44.102 HADOOP03





Ubuntu installation JDK jdk-8u65-linux-x64.tar.gz
---------------------------------------------------------
A, install the JDK
1, copy jdk-8u65-linux-x64.tar.gz to ~/downloads
$>cp/mnt/hgfs/downloads jdk-8u65-linux-x64.tar.gz ~/downloads
2, jdk-8u65-linux-x64.tar.gz tar will be opened
$>TAR-XZVF jdk-8u65-linux-x64.tar.gz
3, create folder soft
$> sudo mkdir/soft
4, change the owner of soft
$> sudo chown ubuntu (user): Ubuntu (group)/soft
5. Copy the JDK file to the current directory/soft
$>MV ~/downloads/jdk1.8.0_65/soft/
6, creating Symbolic links
$>ln-s/soft/jdk1.8.0_65 jdk named jdk1.8.0_65 as JDK
$>ls
b, configuring environment variables
1, go to etc/environment, edit
$>cd/etc
$>nano Environment
PATH = "....:/soft/jdk/bin"
Java_home =/SOFT/JDK
2, let the environment variable take effect
$> source/etc/environment
3, check whether the installation is successful
$>CD ~
$> java-version

Ubuntu Configuration Hadoop hadoop-2.7.0.tar.gz
------------------------------------------------------
A, install Hadoop
1, copy hadoop-2.7.0.tar.gz to ~/downloads
$>cp/mnt/hgfs/downloads hadoop-2.7.0.tar.gz ~/downloads
2, hadoop-2.7.0.tar.gz tar will be opened
$>TAR-XZVF hadoop-2.7.0.tar.gz
3. Copy the Hadoop file to the current directory/soft
$>MV ~/downloads/hadoop-2.7.0/soft/
4, creating Symbolic links
$>ln-s/soft/hadoop-2.7.0 Hadoop to name hadoop-2.7.0 Hadoop
$>ls
b, configuring environment variables
1, go to etc/environment, edit
$>cd/etc
$>nano Environment
PATH = "....:/soft/jdk/bin:/soft/hadoop/bin:/soft/hadoop/sbin"
Java_home =/SOFT/JDK
Hadoop_home=/soft/hadoop
2, let the environment variable take effect
$> source/etc/environment
3, check whether the installation is successful
$>CD ~
$> java-version

Cond

Some of the problems that you encounter during the process of using Ubuntu

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.