Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Linux Ask!

Jun 192011
 

Install Google Chrome in Ubuntu

Answer:

To install Google Chrome in Ubuntu, the simplest way is to us PPA

E.g.

1. Add the key and URL

# wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - 
# sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'

2. Install it

# sudo apt-get update 
# sudo apt-get install google-chrome-stable

Done.

Jun 152011
 

Auto create complete directory structure when copying files in Linux

Answer:

Assume you are copying file using the command below:

# cp foo/bar/test.txt /tmp/

The result is test.txt will be placed inside the folder /tmp/.

In order to let the cp command auto create the foo/bar/ directory structure under /tmp, you can try the command:

# cp --parent foo/bar/test.txt /tmp/

Jun 112011
 

Changing the default Java environment in Ubuntu

Answer:

If you have more than one JVM (Java Virtual Machine) installed in your Ubuntu server, e.g. OpenJDK and the Oracle JDK, you can easily select them using the following command:

# sudo update-alternatives --config java

Following the instruction and you can easily set them as you want.