Tuesday, July 19, 2011

Quick Windows Commands

To Access…Run Command
Accessibility Controlsaccess.cpl
Accessibility Wizardaccwiz
Add Hardware Wizardhdwwiz.cpl
Add/Remove Programsappwiz.cpl
Administrative Toolscontrol admintools
Adobe Acrobat (if installed)acrobat
Adobe Designer (if installed)formdesigner
Adobe Distiller (if installed)acrodist
Adobe ImageReady (if installed)imageready
Adobe Photoshop (if installed)photoshop
Automatic Updateswuaucpl.cpl
Bluetooth Transfer Wizardfsquirt
Calculatorcalc
Certificate Managercertmgr.msc
Character Mapcharmap
Check Disk Utilitychkdsk
Clipboard Viewerclipbrd
Command Promptcmd
Component Servicesdcomcnfg
Computer Managementcompmgmt.msc
Control Panelcontrol
Date and Time Propertiestimedate.cpl
DDE Sharesddeshare
Device Managerdevmgmt.msc
Direct X Control Panel (if installed)*directx.cpl
Direct X Troubleshooterdxdiag
Disk Cleanup Utilitycleanmgr
Disk Defragmentdfrg.msc
Disk Managementdiskmgmt.msc
Disk Partition Managerdiskpart
Display Propertiescontrol desktop
Display Propertiesdesk.cpl
Display Properties (w/Appearance Tab Preselected)control color
Dr. Watson System Troubleshooting Utilitydrwtsn32
Driver Verifier Utilityverifier
Event Viewereventvwr.msc
Files and Settings Transfer Toolmigwiz
File Signature Verification Toolsigverif
Findfastfindfast.cpl
Firefox (if installed)firefox
Folders Propertiesfolders
Fontscontrol fonts
Fonts Folderfonts
Free Cell Card Gamefreecell
Game Controllersjoy.cpl
Group Policy Editor (XP Prof)gpedit.msc
Hearts Card Gamemshearts
Help and Supporthelpctr
HyperTerminalhypertrm
Iexpress Wizardiexpress
Indexing Serviceciadv.msc
Internet Connection Wizardicwconn1
Internet Exploreriexplore
Internet Propertiesinetcpl.cpl
Internet Setup Wizardinetwiz
IP Configuration (Display Connection Configuration)ipconfig /all
IP Configuration (Display DNS Cache Contents)ipconfig /displaydns
IP Configuration (Delete DNS Cache Contents)ipconfig /flushdns
IP Configuration (Release All Connections)ipconfig /release
IP Configuration (Renew All Connections)ipconfig /renew
IP Configuration (Refreshes DHCP & Re-Registers DNS)ipconfig /registerdns
IP Configuration (Display DHCP Class ID)ipconfig /showclassid
IP Configuration (Modifies DHCP Class ID)ipconfig /setclassid
Java Control Panel (if installed)jpicpl32.cpl
Java Control Panel (if installed)javaws
Keyboard Propertiescontrol keyboard
Local Security Settingssecpol.msc
Local Users and Groupslusrmgr.msc
Logs You Out Of Windowslogoff
Malicious Software Removal Toolmrt
Microsoft Access (if installed)msaccess
Microsoft Chatwinchat
Microsoft Excel (if installed)excel
Microsoft Frontpage (if installed)frontpg
Microsoft Movie Makermoviemk
Microsoft Paintmspaint
Microsoft Powerpoint (if installed)powerpnt
Microsoft Word (if installed)winword
Microsoft Syncronization Toolmobsync
Minesweeper Gamewinmine
Mouse Propertiescontrol mouse
Mouse Propertiesmain.cpl
Nero (if installed)nero
Netmeetingconf
Network Connectionscontrol netconnections
Network Connectionsncpa.cpl
Network Setup Wizardnetsetup.cpl
Notepadnotepad
Nview Desktop Manager (if installed)nvtuicpl.cpl
Object Packagerpackager
ODBC Data Source Administratorodbccp32.cpl
On Screen Keyboardosk
Opens AC3 Filter (if installed)ac3filter.cpl
Outlook Expressmsimn
Paintpbrush
Password Propertiespassword.cpl
Performance Monitorperfmon.msc
Performance Monitorperfmon
Phone and Modem Optionstelephon.cpl
Phone Dialerdialer
Pinball Gamepinball
Power Configurationpowercfg.cpl
Printers and Faxescontrol printers
Printers Folderprinters
Private Character Editoreudcedit
Quicktime (If Installed)QuickTime.cpl
Quicktime Player (if installed)quicktimeplayer
Real Player (if installed)realplay
Regional Settingsintl.cpl
Registry Editorregedit
Registry Editorregedit32
Remote Access Phonebookrasphone
Remote Desktopmstsc
Removable Storagentmsmgr.msc
Removable Storage Operator Requestsntmsoprq.msc
Resultant Set of Policy (XP Prof)rsop.msc
Scanners and Camerassticpl.cpl
Scheduled Taskscontrol schedtasks
Security Centerwscui.cpl
Servicesservices.msc
Shared Foldersfsmgmt.msc
Shuts Down Windowsshutdown
Sounds and Audiommsys.cpl
Spider Solitare Card Gamespider
SQL Client Configurationcliconfg
System Configuration Editorsysedit
System Configuration Utilitymsconfig
System File Checker Utility (Scan Immediately)sfc /scannow
System File Checker Utility (Scan Once At The Next Boot)sfc /scanonce
System File Checker Utility (Scan On Every Boot)sfc /scanboot
System File Checker Utility (Return Scan Setting To Default)sfc /revert
System File Checker Utility (Purge File Cache)sfc /purgecache
System File Checker Utility (Sets Cache Size to size x)sfc /cachesize=x
System Informationmsinfo32
System Propertiessysdm.cpl
Task Managertaskmgr
TCP Testertcptest
Telnet Clienttelnet
Tweak UI (if installed)tweakui
User Account Managementnusrmgr.cpl
Utility Managerutilman
Windows Address Bookwab
Windows Address Book Import Utilitywabmig
Windows Backup Utility (if installed)ntbackup
Windows Explorerexplorer
Windows Firewallfirewall.cpl
Windows Magnifiermagnify
Windows Management Infrastructurewmimgmt.msc
Windows Media Playerwmplayer
Windows Messengermsmsgs
Windows Picture Import Wizard (need camera connected)wiaacmgr
Windows System Security Toolsyskey
Windows Update Launcheswupdmgr
Windows Version (to show which version of windows)winver
Windows XP Tour Wizardtourstart
Wordpadwrite

How to install Linux / UNIX *.tar.gz tarball files

 tar.gz also known as tarball, an archive format for electronic data and software. Most Linux tarball contains a source code for software. If you are new to Linux I recommend using apt-get, rpm and yum command to install all binary packages.
Tarballs are a group of files in one file. Tarball files have the extension .tar.gz, .tgz or .tar.bz2. Most open source software use tarballs to distribute programs/source codes.

# 1: Uncompress tarball

To uncompress them, execute the following command(s) depending on the extension:
$ tar zxf file.tar.gz
$ tar zxf file.tgz
$ tar jxf file.tar.bz2
$ tar jxf file.tbz2

Now change directory
$ ls
$ cd path-to-software/

# 2: Build and install software

Generally you need to type 3 commands as follows for building and compiling software:
# ./configure
# make
# make install
Where,
  • ./configure will configure the software to ensure your system has the necessary functionality and libraries to successfully compile the package
  • make will compile all the source files into executable binaries.
  • Finally, make install will install the binaries and any supporting files into the appropriate locations.

# 3: Read INSTALL / README file

Each tarball comes with installation and build instructions. Open INSTALL or README file for more information:
$ vi INSTALL

Open SSL

Self-Signed IIS SSL Certificates using OpenSSL
This tutorial assumes that you have a Linux box with OpenSSL installed,and that you want to create a self-signed certificate for IIS5.0
  1. Set up your CA (you only have to do this once)
    ON THE LINUX BOX…
    • Create a private key
      openssl genrsa -des3 -out CA.key 1024
      (You’ll need to supply a passphrase. DON’T FORGET THIS!!)
    • Set this to read-only for root for security
      chmod 400 CA.key
    • Create the CA certificate
      openssl req -new -key CA.key -x509 -days 1095 -out CA.crt
      (Provide appropriate responses to the prompts…for Common Name, you might want to use something like “OurCompany CA”)
    • Set the certificate to read-only for root for security
      chmod 400 CA.crt
  2. Obtain a CSR
    ON THE IIS BOX…
    • Open the Internet Manager
    • Select the site for which you want to create a key
    • Right-click and choose Properties
    • Select the “Directory Security” tab
    • Click the “Server Certificate” button
    • Follow the prompts to create a CSR
    • Save
      your CSR, then transfer it to the Linux box for further processing.
      (For the following steps, we’ll refer to your CSR as “new.csr”)
  3. Sign the CSR
    ON THE LINUX BOX…
    • Sign the CSR (all of this on one line)
      openssl x509 -req -days 365 -in new.csr -CA CA.crt
      -CAkey CA.key -CAcreateserial -out new.crt
    • Transfer the new.crt file back to the IIS box
  4. Install self-signed certificate
    ON THE IIS BOX…
    • Open the Internet Manager
    • Select the site to install the key
    • Right-click and choose properties
    • Select the “Directory Security” tab
    • Click the “Server Certificate” button
    • Specify that you want to complete the pending request
    • Select the .crt file that you just transferred

  5. 1. Internet Information Services -> select the site -> right click -> Properties
    2. Directory Security -tab -> Secure communications -frame -> Edit…
    3. Select “Enable certificate trust list”, click New… -> Next
    4. Add from file -> use CA.crt -> Next
    5. Write something to the Name and Description, if you like. -> Next -> Finish
Reference websites:


Few Linux Commands Copied :)

  1. copy files from one linux server to another through shell
    $ scp user@from_computer:dir/filename user@to_computer:dir/filename
  2. open shell to another linux machine from one through shell
    $ ssh user@to_computer
  3. Prints the owner of every file or directory in the current directory. The AWK syntax is simply “print the 3rd field in every line of data”
    ls -l | awk '{print $3}'
  4. To get the owner of only one file (filename):
    ls -l | grep filename | awk '{print $3}'
  5. To compress a folder:
    zip -r target.zip folder/
  6. User creation
    useradd username
  7. Change user password
    passwd username
  8. Add user to a group
    usermod -g grpname username
  9. Import SQL script to an empty mysql database
    mysql -u root -p database_name < script_file.sql
  10. Unfreeze vi editor in terminal window when frozen because of ctrl+S action
    press ctrl+q
  11. Reboot linux server remotely
    sudo reboot
  12. Shut down linux server remotely
    sudo shutdown -h now
  13. Kill a process
    top
    type k to kill a process. You will be prompted for the PID of the task, and the signal to send to it. For a normal kill, send signal 15. For a sure, but rather abrupt, kill, send signal 9. The default signal, as with kill(1), is 15, SIGTERM. This command is not available in secure mode.
    
  14. To close port – 80 in following example
    fuser -k 80/tcp
  15. To display linux distribution
    1cat /etc/issue