Wednesday, April 20, 2011

using Ubuntu

  • copy files from your local host to a server
    • scp PATHNAME_HERE  target-host:/PATHNAME_THERE
    • scp -rp user1@host1:/filepath1 user2@host2:/filepath2
  • if you can not get "apt-get" done, that may be because your selected ubuntu mirror server is down. So what you need to do is change the mirror server. 
    • Go to: System->Administration->Update Manager->Settings->Ubuntu Software->Download from, and check the active mirror servers and choose one.
  • search files for some contents in a certain directory
    • find . -type f|xargs grep -e "content"
    • find file-path file-type | xargs grep "content"
  • to see if some application has been installed or not
    • command: $ type <package-name>
    • command: $ apt-cache policy <package-name>
  • setup sharing folder between Ubuntu(guest) and MacOS(host) using VirtualBox
    • step 1: on your host OS, go to VirtualBox -> machine -> settings -> Shared Folders, add the folder, say folder1, you want to share with your guest OS (leave auto-mount default)
    • step 2: on Ubuntu, create a new folder "folder2", and edit /etc/fstab file by adding the following line:
      • folder1 /home/xxx/folder2 vboxsf auto,rw,gid=1000,uid=1000 0 0
      • what must be noted is the second parameter should be an absolute path
    • then reboot your guest OS

No comments:

Post a Comment