Tuesday, February 24, 2015

How to invoke proxy settings dialog from the command line in windows?



in Run execute 
"inetcpl.cpl"

or if you want to switch to connections tab directly, execute 
"inetcpl.cpl ,4"


tested with windows 7

Tuesday, July 29, 2014

How to share windows folders with Ubuntu

There are two ways of doing this, as a regular user (available only to the person setting it up), and as root (the system administrator). Setting up the connection system-wide using the latter approach will allow read-only access by everyone on the system, but they won't be able to write to it.

Mounting the share in user space

  1. Open the Files file manager.
  2. Files » Connect to Server.
  3. For the Server Address, enter the following (where HOSTNAME is the server name and SHARE is the share name):
    • smb://HOSTNAME/SHARE
  4. Hit the Connect button.
The share will now be available in Files on the left sidebar under the Network section, and it will be available from the command-line interface (CLI) over at /run/user/$USER/gvfs/ where $USER is your local user name. I'd recommend adding softlink to more easily access your mounts:
  • ln -s /run/user/$USER/gvfs ~/mounts
For more information, see:

Mounting the share system-wide

This needs be done as the superuser, but the share should be readable by everyone. It will add a package to work the target file system, create a local folder to house the files and finally mount the remote share locally.
  1. sudo apt-get install cifs-utils
  2. sudo mkdir /mnt/LOCAL_SHARE_NAME
  3. sudo mount -t cifs //REMOTE_HOST_NAME/REMOTE_SHARE_NAME /mnt/LOCAL_SHARE_NAME

Friday, January 22, 2010

How to restart or shutdown Windows from command prompt

XP Ships with shutdown.exe, and is also found on Windows Server 2003. You can download a copy for Windows 2000, and Windows 2000 server as it is found in the AdminPak.msi suite of software. XP a& Win server 2003 ship with the .exe

the windows XP/2003 uses the "-" as the flag seperator, but windows 2000 uses the "/" as the flag seperator

for XP, go to the command prompt and type:

shutdown /?

this will show all of the available options. I use it all the time to reboot my servers in the middle of the night via a scheduled .bat file

this is a sample of how to reboot in 60 seconds, with a comment to the popup

shutdown -r -t 60 -c "Your message ( optional)"

to cancel, just type

shutdown -a


for shutdown

shutdown -s -t 60 -c "your message(optional)"

Friday, February 20, 2009

Remove Control-M Chars in Unix using vi

UNIX treats the end of line differently than other operating systems. Sometimes when editing files in both Windows and UNIX environments, a CTRL-M character is visibly displayed at the end of each line as ^M in vi.

Type :%s/Control+V Control+M//g

and it will looks like: :%s/^M//g

In UNIX, you can escape a control character by preceeding it with a CONTROL-V. The :%s is a basic search and replace command in vi. It tells vi to replace the regular expression between the first and second slashes (^M) with the text between the second and third slashes (nothing in this case). The g at the end directs vi to search and replace globally (all occurrences).

Monday, January 5, 2009

How to get the release of a Linux kernal?

I found its difficult to get the release name and version of a partilcular linux distribution by using the uname command
It can show only 'Linux myhostname and blah blah blah' . But i just wanted to know which distribution and release i'm running. so after a small research i found the command which is very helpful for the purpose.

cat etc/*release

that will display the distribution name and release like :

Red Hat Linux release 7.1 (Seawolf)

Bingo!!!