Ubuntu notes (1)

Source: Internet
Author: User

Ubuntu notes (1)

1. Configure Java environment variables:


This method is recommended if your computer is used only for development, because all users' shells have the right to use these environment variables, which may bring security issues to the system.
· Open/etc/profile in a text editor
· Add at the end of the profile file

:export JAVA_HOME=/usr/share/jdk1.6.0_14export PATH=$JAVA_HOME/bin:$PATHexport CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

Use source/etc/profile for updates

2. Configure Android_SDK Environment Variables

Edit the. bashrc File

#GRADLE_HOMEexport GRADLE_HOME=/home/xff/ant/gradle-2.2#Android_HOMEexport ANDROID_HOME=/home/xff/ant/android_sdkexport PATH=$GRADLE_HOME/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$ANDROID_HOME/build-tools:$PATH:

 

Use source/etc/profile for updates

If it is 64-bit,"

Adb: error while loading shared libraries: libstdc ++. so.6: "problem, enter

 

Sudo apt-get install lib32stdc ++ 6

3. Use vpn to wall over:

1. Install OpenVpn

2 install sudo apt-get install network-manager-openvpn-gnome

4. The navigation bar disappears or the sidebar disappears.:

Run the command: ccsm on the command line to configure CompizConfig.

5. Nvidia driver problems:

Search for additional drivers under "software and updates! Note that it will be automatically located at Ubuntu14.04. For example, if you select the option that contains NVIDIA, and the application changes

6. Specify a new partition for/usr (mount to/usr)

Cause: when you start to install the system, allocate 10 Gb space to the/directory without assigning partitions to the/usr directory separately. Therefore, after the system runs for a period of time and installs some programs, the space used by the Directory/has reached 5.5 GB. Later, I found that the/usr directory is occupying space, so I want to re-partition it.

Step: 1> to attach a partition to/usr, you must use a free partition! (I am a dual-system installed, and I have allocated all the hard disk space.) because I have allocated all the hard disk space, and I do not want to lose the original data, therefore, you can only separate some spaces from one used partition and separate them as one partition without formatting existing partitions! You can use the "change size" function of the tool Gparted to achieve this by using the command

Sudo apt-get install gparted to install;

2> Format the partition using et3 or et4. Then, use gparted to view the detailed information of the partition and record the UUID.

3> create a directory under the/mnt directory to mount the newly added partition/dev/sda9 and copy all the data under/usr to/mnt/usr.

<span style="font-size:14px;"> $sudo mkdir /mnt/usr$ sudo mount /dev/sda9 /mnt/usr</span>
<span style="color: rgb(34, 34, 34); font-family: 'Ubuntu Mono', 'Ubuntu Beta Mono A', Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; white-space: inherit; line-height: 18.2000007629395px; background-color: rgb(238, 238, 238);"><span style="font-size:14px;">$ cp -dpRxv /usr/* /mnt/usr</span></span>

 

4> modify the/etc/fstab file and add the following content. The UUID is recorded in the previous section.

<span style="font-size:14px;"># usr was on /dev/sda9 during installationUUID=5a2eb449-774f-4e55-9fd0-9d086744dfc1 /usr            ext4    defaults        0       2</span>

 

5> delete all old data in the/usr directory

 

$ sudo rm -Rvf /usr/*  
6> after completing the above steps, unfortunately, the restart command cannot be found! So you can only turn off the power and restart your computer! After restart, the/usr directory is the newly mounted partition! Success

 

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.