2011/05/07

Android SDK (Eclipse Portable)

*Eclipse (Portable)
*Android SDK

http://www.eclipse.org/downloads
http://developer.android.com/sdk/index.html

>Help
>>Install New Software

>Add
>>Location https://dl-ssl.google.com/android/eclipse/

>Select All

>Next>>Next>>>Next

Eclipse *Portable

#eclipse-SDK-3.6.2-linux-gtk-x86_64.tar.gz, ubuntu-10.04.2-desktop-amd64

>System
>>Administration
>>>Synaptic Package Manager
>>>Quick Search
>>>>ia32-libs

>Make Link

2011/05/06

sun-java6-jdk

*ubuntu

sudo apt-get autoremove sun-java6-jdk

#add repository

add-apt-repository "deb http://archive.canonical.com/ lucid partner"

or

sudo vim.tiny /etc/apt/sources.list


#

sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-plugin

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  java-common odbcinst odbcinst1debian1 sun-java6-bin sun-java6-jre unixodbc
Suggested packages:
  default-jre equivs sun-java6-demo openjdk-6-doc sun-java6-source sun-java6-fonts ttf-kochi-gothic
  ttf-sazanami-gothic ttf-kochi-mincho ttf-sazanami-mincho libmyodbc odbc-postgresql tdsodbc
  unixodbc-bin
The following NEW packages will be installed:
  java-common odbcinst odbcinst1debian1 sun-java6-bin sun-java6-jdk sun-java6-jre sun-java6-plugin
  unixodbc
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 55.0MB/55.3MB of archives.
After this operation, 164MB of additional disk space will be used.
Do you want to continue [Y/n]? y

#
sudo update-java-alternatives -s java-6-sun

#javac

#java -version

#Choose a Version

sudo update-alternatives --config java 


autoremove

#ubuntu

sudo apt-get autoremove sun-java6-jdk

117-101 #20

*117-101

*. You've downloaded an image file of a boot floppy disk to your hard drive. What is the best utility to
create a boot floppy from the disk image? (Specify a single command without options.)
Answer: dd /bin/dd

*. In which directory must definition files be placed to add additional repositories to yum?
Answer: /etc/yum.repos.d /etc/yum.repos.d/yum.repos.d yum.repos.d/

*. The file myfile.txt contains the following data:
joe:x:100:100:Joe:/home/joe:/bin/bash
mike:x:101:101:Mike:/home/mike:/bin/sh
kevin:x:102:102:Kevin:/home/kevin:/bin/sh
matt:x:103:103:Matt:/home/matt:/bin/sh
What output will be displayed on the screen when the following command is executed:
grep o home myfile.txt
A. No output will be displayed on the screen
B. home
home
home
home
C. /home/joe
/home/mike
/home/Kevin
/home/matt
D. joe
mike
Kevin
matt
Answer: B

*. Which TWO runlevels should never be declared as the default runlevel?
A. 0
B. 3
C. 5
D. 6
Answer: AD

*. What does the command mount a do?
A. It mounts the floppy disk for all users.
B. It shows all mounted file systems.
C. It opens /etc/fstab to edit.
D. It mounts all file systems listed in /etc/fstab.
Answer: D

*. After modifying LILO's configuration file, what command should you run for the changes to take effect?
A. kill HUP `pidof lilo`
B. liloinstall
C. lilo
D. reboot
Answer: C

*. After modifying GRUB's configuration file, what command should you run for the changes to take
effect?
A. kill HUP `pidof grub`
B. grubinstall
C. grub
D. no action is required
Answer: D

*. In GRUB's configuration file you find the line root (hd1,4)
What is corresponding device name on a Linux system?
A. /dev/hda4
B. /dev/hda5
C. /dev/hdb4
D. /dev/hdb5
Answer: D

*. Which configuration file should be modified to disable the ctrlaltdelete key combination?
A. /etc/keys
B. /proc/keys
C. /etc/inittab
D. /proc/inittab
E. /etc/reboot
Answer: C

*. You are trying to make a hard link to an ordinary file but ln returns an error. Which of the following
could cause this?
A. The source file is hidden.
B. The source file is readonly.
C. The source file is a shell script.
D. You do not own the source file.
E. The source and the target are on different filesystems.
Answer: E

*. You have read/write permission on an ordinary file foo. You have just run ln foo bar. What would
happen if you ran rm foo?
A. foo and bar would both be removed.
B. foo would be removed while bar would remain accessible.
C. foo would be removed. bar would still exist but would be unusable.
D. Both foo and bar would remain accessible.
E. You would be asked whether bar should be removed.
Answer: B

*. You wish to kill a process with a PID of 123. Select the command which will allow the process to
"clean up" before exiting.
A. kill 1 123
B. kill 9 123
C. kill 15 123
D. kill 17 123
Answer: C

*. What is the default process priority when a process is started using the nice command?
A. 10
B. 10
C. 20
D. 0
Answer: B

*. You are formatting a single hard disk for a Linux install. What is the maximum number of primary
partitions you can create?
Answer: 4 four

*. In order to append the output of ls to a file called bazz, which of the following command lines would
you use?
A. ls > bazz
B. ls >& bazz
C. ls &> bazz
D. ls >> bazz
Answer: D

*. What command line redirection characters instruct the shell to read from the current input source until
a specific word, on a separate line and without and trailing spaces, is reached?
A. <<
B. <|
C. !<
D. &<
Answer: A

*. What information is displayed by the command cat /proc/dma?
A. whether DMA is enabled
B. which DMA channels are in use
C. which DMA mode is in use
D. general information about DMA on the machine
Answer: B

*. What file contains kernel level logging information such as output from a network driver module when
it is loaded?
Answer: /var/log/messages messages kern.log /var/log/kern.log

*. To what environment variable will you assign or append a value if you need to tell the dynamic linker
to look in a build directory for some of a program's shared libraries?
A. LD_LOAD_PATH
B. LD_LIB_PATH
C. LD_LIBRARY_PATH
D. LD_SHARE_PATH
E. LD_RUN_PATH
Answer: C

*. Which file in the /proc filesystem lists parameters passed from the bootloader to the kernel?
Answer: cmdline /proc/cmdline

list_hw

#ubuntu

sudo apt-get install sysinfo

(sudo) lshw

2011/05/04

KVM

@ubuntu

#check CPU (Intel vmx / AMD svm)
$ egrep '(vmx|svm)' --color=always /proc/cpuinfo

#check KVM kernel module
$ lsmod | grep kvm

#check Kernel (with KVM kernel module (2.6.20))
$ sudo modprobe -l | grep kvm
kernel/arch/x86/kvm/kvm.ko
kernel/arch/x86/kvm/kvm-intel.ko
kernel/arch/x86/kvm/kvm-amd.ko

#VM module for Intel CPU
$ sudo modprobe kvm-intel

#KVM module for AMD CPU
$ sudo modprobe kvm-amd

#install KVM, OOXX, etc.
$ sudo apt-get install kvm qemu-kvm bridge-utils libvirt-bin virtinst vtun virt-manager