mount windows shared folder from ubuntu

Two methods, depending on share host cifs or smbfs
smbfs is the "original" method.However, smbfs is not compatible with security signatures, which are enabled by default and
not recommended to disable on Windows Server 2003 and later. If a share is served by Windows Server 2003 or later, you should use cifs.
The "smbfs" package provides the tools needed to mount "smbfs" and "cifs" filesytems. You may have smbfs installed on your machine. If not, run

#sudo apt-get install smbfs
Mount Windows Shared folder with windows authentication
#mkdir -p /opt/win-share
#mount -t cifs //192.168.155.xxx/tools/ /opt/win-share/ --verbose -o username=administrator  #this will prompt for administrator password
#mount -t cifs //192.168.155.xxx/tools/ /opt/win-share/ --verbose -o username=administrator,password=****
Mount Windows Shared folder without authentication
#touch win-share-pass
#vi win-share-pass       #open win-share-pass and add below lines on it
username=administrator  #we can specify a user name to access the shared folder
password=********
Save the file

mount -t cifs //192.168.155.117/tools/ /opt/win-share/ --verbose -o credentials=/home/user/win-share-pass

Useful commands for Windows

Type below commands and press Enter in the command prompt  in Window


net view : Display information about the domains, computers, or resources that are shared by the specified computer, including the offline client caching settings.
net share : Create, delete, manage, and display shared resources.
net file : View and control resources that are shared on the network. The Server service must be running for you to use this command.
net config : View the maximum number of users who can access a shared resource and the maximum open files per session.

how to mount ISO on Ununtu

Mount iso in Ubuntu
mount -o loop -t iso9660 /path/to/iso/file.iso /media/cdrom
umount /media/cdrom or umount -f /media/cdrom

commands to check whether vmware tools installed or not in ubuntu guest & the version

# ps -ef | grep vmware-guestd
root     10213     1  0 15:33 ?        00:00:00 /usr/lib/vmware-tools/sbin32/vmw                                                             are-guestd --background /var/run/vmware-guestd.pid
root     10446 10429  0 15:44 pts/0    00:00:00 grep vmware-guestd

OR

# ps -ef | grep vmware-tools
root     10213     1  0 15:33 ?        00:00:00 /usr/lib/vmware-tools/sbin32/vmware-guestd --background /var/run/vmware-guestd.pid
root     10559 10429  0 15:52 pts/0    00:00:00 grep vmware-tools
# vmware-config-tools.pl -h
Use of uninitialized value $gSystem{"system"} in concatenation (.) or string at                                                              /usr/bin/vmware-config-tools.pl line 2421.
VMware Tools 4.0.0 build-171294 for  configurator
Usage: /usr/bin/vmware-config-tools.pl [[-][-]d[efault]] [[-][-]c[ompile]]
[[-][-]p[rebuilt]] [[-][-]t[ry-modules]] [[-][-]p[reserve]]
[[-][-]o[verwrite][[-][-]m[odules-only]] [[-][-]k[ernel-version] version]
. default: Automatically answer questions with the proposed answer.
. compile: Force the compilation of kernel modules.
. prebuilt: Force the use of pre-built kernel modules.
. try-modules: Try to load all the compatible modules . preserve: Always
preserve user-modified configuration files.
. overwrite: Always overwrite user-modified configuration files.from the VMware
Tools package.
. modules-only: Only build/install kernel modules, skip all other configuration
steps.
. kernel-version: Build/install modules for the given kernel version instead of
the running one, implies modules-only, skip-stop-start and compile.
Command line arguments:  The acceptable characters are:
        the letters A, B, C, ...,
        the letters a, b, c, ...,
        the numbers 0, 1, 2, ...,
        and the special characters '_' and '-' and '='.

# grep buildNr /usr/bin/vmware-config-tools.pl
  my $buildNr;
  $buildNr = '4.0.0 build-171294';
  return remove_whitespaces($buildNr);

Add Swap Partition in Linux/Ubuntu

  Create a 512MB swap file
  #dd if=/dev/zero of=/mnt/new.swap bs=1M count=512
  Change Permission to new.swap
  #chmod 600 /mnt/new.swap
  Formatting that file to create a swapping device:
  #mkswap /mnt/512Mb.swap
  Adding the swap to the running system:
  #swapon /mnt/512Mb.swap
  To check swap info
  #cat /proc/meminfo.
 Making the change permanent, open fstab 
 #  vi /etc/fstab
Add below line at the end of the file and save.
/mnt/new.swap none swap sw 0 0

Change Computer or Host Name in Windows Using Command

Below is the command to rename Computer Name or Hostname in Windows.Changing Computer name will require a reboot. Follow below commands to change computer name and reboot system.

wmic computersystem where name="OLDNAME" call rename name="NEWNAME"
shutdown -r   ---Reboot System
hostname       ----Display Computer Name or Hostname in Windwos  and Linux as well.

check running status & kill services in Windows from command line

tasklist  --- To see the list of running services & PID (Process ID) on Windows from command line.
taskkill --- To kill any running services on Windows from command line
  1. Go to Start > Run, then type CMD and press Enter.
  2. In the Command Prompt window type any of the above commands(taskkill,tasklist) and press enter key
Ex: taskkill /PID 1412 /PID 139 /T /F  ---- To kill running service
above command will kill process id 1412 and 139 forcefully 
/T -Tree kill
/F -forcefully