Sunday, March 21, 2010

Ubuntu 9.10 (Desktop) Command Prectice

Ubuntu 9.10 (Desktop) Command Prectice
Installing VMware Player on Ubuntu 9.10:
$ sudo aptitude install build-essential linux-kernel-headers linux-kernel-devel
$ gksudo bash ./<VMware-Player-2.5.1-126130.i386.bundle>
Installing VMware Player on Ubuntu 9.10
1. Install required packages build-essential and linux-headers
      $ sudo aptitude install build-essential linux-headers-`uname -r`

2. Download the latest(http://downloads.vmware.com/d/info/desktop_downloads/vmware_player/3_0) VMware player e.g. VMware-Player-2.5.2-156735.i386.bundle (download the bundle version, not the rpm one) and run it as root using gksudo. You'll get a graphical installer that installs VMware player for you.
      $ gksudo bash ./VMware-Player-3.0.1-227600.i386.bundle

If nothing appears, you may need to make the file executable. You can do so with this command: $ chmod +x ./VMware-Player-3.0.1-227600.i386.bundle

After completion, VMware player is installed and should show up in the menu under Applications → System Tools → VMware Player.

Installing VMware WorkStation on Ubuntu 9.10:
$ sudo aptitude install build-essential linux-kernel-headers linux-kernel-devel
$ gksudo bash ./VMware-Workstation-Full-7.0.0-203739.i386.bundle

Uninstalling VMware WorkStation on Ubuntu 9.10:
$ gksudo bash ./VMware-Player-2.5.1-126130.i386.bundle

Flash player install:
$ sudo apt-get install flashplugin-nonfree

Java Install:

$ sudo aptitude install sun-java6-jdk
$ aptitude search sun-java

Eclipse Install:

$ apt-get install eclipse

Shutdown Ubuntu Server:

$ sudo shutdown -h now
$ sudo shutdown -h 0
$ sudo shutdown -h 18:45 "Server is going down for maintenance"
$ sudo halt
$ sudo poweroff
$ sudo reboot
$ sudo shutdown -r 0

Change IP address:

$ sudo vi /etc/network/interfaces

auto eth0
iface eth0 inet dhcp

auto eth0
iface eth0 inet static
        address 192.168.0.100
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1

$ sudo vi /etc/resolv.conf
$ sudo apt-get remove dhcp-client
$ sudo /etc/init.d/networking restart

Change the sudo password:

$ sudo passwd
enter new password:
repeat new password again:

Change Hostname:

$ sudo hostname <NEW HOSTNAME>
$ hostname

Install Open SSH:

$ sudo apt-get update
$ sudo apt-get install openssh-server
$ sudo vi /etc/ssh/sshd_config


   LogLevel INFO        # 詳細に取りたい場合はDEBUG
   UsePrivilegeSeparation yes
   Protocol 2
   PermitRootLogin no      # またはwithout-password
   StrictModes yes
   VerifyReverseMapping yes   # ホスト名が逆引きできるか確認します()
   AllowTcpForwarding no    # forwardがいらない場合
   X11Forwarding no       # forwardがいらない場合
   IgnoreRhosts yes
   HostbasedAuthentication no
   RhostsAuthentication no
   RhostsRSAAuthentication no
   AllowGroups admin      # ログインはadminグループ(sudoの可能な人)のみ

$ sudo /etc/init.d/ssh reload

Create Private Key:(If you need private key)$ ssh-keygen
$ chmod 700 ~/.ssh
$ cd ~/.ssh/
$ cat id_rsa.pub >> ~/.ssh/authorized_keys
$ chmod 600 ~/.ssh/authorized_keys
$ rm id_rsa.pub

$ sudo vi /etc/ssh/sshd_config
   ChallengeResponseAuthentication no
   PasswordAuthentication no
   UsePAM no
$ sudo invoke-rc.d ssh reload 

Remove Directory:

$ rm -r directory

Delete User:

$ sudo userdel -r <username>

Show IP Address:

$ /sbin/ifconfig
$ ifconfig

VI Editor:

:w! → Save
dd → Delete one line
xx →Delete Letter
i → Insert Mode
/ → Find

How to install [.deb] package:
$ sudo dpkg -i <install package or .deb file>
$ sudo dpkg -r <remove package name>

No comments:

Post a Comment