- Shutdown Ubuntu Guest Machine
- Open Virtualbox
- Highlight Ubuntu Guest Machine
- Click Settings
- Click Display
- Uncheck Enable 3D Acceleration
- Uncheck Enable 2D Video Acceleration
- Click OK
- Start Ubuntu Guest Machine
- Open Chromium
Friday, September 30, 2016
How to fix Chromium Latest Version on Ubuntu as Guest At Virtualbox
Wednesday, September 28, 2016
How to install VirtualBox Guest Additions on Ubuntu 16.04
- With the Ubuntu 16.04 as Guest running, click Devices
- Click Insert Guest Additions CD image...
- Open terminal
- Type
sudo apt-get install linux-headers-generic sudo apt-get install build-essentiall dkms sudo apt-get install virtualbox-guest-dkms
- Type N, if the virtualbox-guest-dkms configuration asks you to review the differences
- Open the file explorer (Example: Caja)
- Click the VBOX CD-ROM: VBOXADDITIONS device
- Double click VBoxLinuxAdditions.run
- Click Run
Tuesday, September 27, 2016
How to convert a collection to String in Java
private Map<String, Integer> collection = new HashMap<String, Integer>();
collection.put("row #1", 1);
collection.put("row #2", 2);
for ( String key : collection.keySet() ) {
System.out.println( key );
}
collection.put("row #1", 1);
collection.put("row #2", 2);
for ( String key : collection.keySet() ) {
System.out.println( key );
}
How to install the Android Studio 32-bit libraries on Ubuntu 16.04
- Open terminal
- Type
sudo apt-get install lib32z1:i386 lib32ncurses5:i386 lib32bz2-1.0:i386 lib32stdc++6:i386
How to see which current version of Ubuntu is being used?
- Open terminal
- Type
lsb_release -a
Saturday, September 10, 2016
How to install Oracle Java 8 on Ubuntu
- Open terminal
- Type
sudo apt-get update
sudo apt-get install default-jre sudo apt-get install default-jdk
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo update-alternatives --config java
-
Choose the java installation number that you want to use as a default
-
Copy the path
- Type
sudo gedit /etc/environment
-
At the end of the file, add the following line:JAVA_HOME={DEFAULT JAVA PATH}{DEFAULT JAVA PATH} is the java installation number that you selected on step 3
-
Save the file
- Close the editor
- Type
source /etc/environment
Example:
I want to use the Oracle Java 8 as default and set the JAVA_HOME to it:
- Open terminal
- Type
sudo apt-get update
sudo apt-get install default-jre sudo apt-get install default-jdk
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo update-alternatives --config java
- Ubuntu will return to a content similar like the below:
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-8-oracle/jre/bin/java 1082 auto mode
1 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode
2 /usr/lib/jvm/java-8-oracle/jre/bin/java 1082 manual mode
Press <enter> to keep the current choice[*], or type selection number:
-
Type 0
- Copy the path of the selection 0 until java-8-oracle ( /usr/lib/jvm/java-8-oracle)
- Type
sudo gedit /etc/environment
-
At the end of the file, add the following line:JAVA_HOME=" /usr/lib/jvm/java-8-oracle"
- Save the file
- Close the editor
- Type
source /etc/environment
Source: https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04
How to install Apache, MySQL and PHP in Ubuntu
- Open terminal
- Type
sudo apt-get update
sudo apt-get install apache2
sudo apt-get install mysql-server
sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql
sudo systemctl restart apache2
How to enable root login in Linux
- Open terminal
- Type
sudo passwd root
Tuesday, September 6, 2016
How to restore MySQL dump/backup?
- Open the Command Prompt (Windows)/Terminal (Linux)
- Go to the folder where it is the MySQL dump/backup file
- Type the following command:
mysql -u {username} -p{password} -h{host} {databaseName} < {backup-name}.sql
{password} is the login's password
{host} is the server name where it is the database
{databaseName} is the database name
{backup-name} is the name back up file name
Example:
I want to restore the Meemaw.sql dump/backup file to the BAZINGA database located at the TheBigBangTheory host with the user name Sheldon and password Cooper.
mysql -u Sheldon -pCooper -h TheBigBangTheory BAZINGA < Meemaw.sql
Source: http://www.thegeekstuff.com/2008/09/backup-and-restore-mysql-database-using-mysqldump/
Thursday, September 1, 2016
How to download a site with wget
- Open terminal or command prompt
- Type
wget --mirror --convert-links --adjust-extension --page-requisites --no-parent {url}
{url} is the url of the site that you wants do download
Example
I want to download the Luiz's Blog
wget --mirror --convert-links --adjust-extension --page-requisites --no-parent http://www.blogger.com
Subscribe to:
Posts (Atom)