9/5/12

Windows command can runoff from RUN COMMAND PROMPT

Here is a list of commands that you can run off from the Run Command Prompt:

Program Run Command

Accessibility Controls = access.cpl

Accessibility Wizard = accwiz
Add Hardware Wizard = hdwwiz.cpl
Add/Remove Programs = appwiz.cpl
Administrative Tools = control admintools
Adobe Acrobat ( if installed ) = acrobat
Adobe Distiller ( if installed ) = acrodist
Adobe ImageReady ( if installed ) = imageready
Adobe Photoshop ( if installed ) = photoshop
Automatic Updates = wuaucpl.cpl
Basic Media Player = mplay32
Bluetooth Transfer Wizard = fsquirt

Calculator = calc
Ccleaner ( if installed ) = ccleaner
C: Drive = c:
Certificate Manager = cdrtmgr.msc
Character Map = charmap
Check Disk Utility = chkdsk
Clipboard Viewer = clipbrd
Command Prompt = cmd
Command Prompt = command
Component Services = dcomcnfg
Computer Management = compmgmt.msc
Compare Files = comp
Control Panel = control
Create a shared folder Wizard = shrpubw

Date and Time Properties = timedate.cpl
DDE Shares = ddeshare
Device Manager = devmgmt.msc
Direct X Control Panel ( if installed ) = directx.cpl
Direct X Troubleshooter = dxdiag
Disk Cleanup Utility = cleanmgr
Disk Defragment = dfrg.msc
Disk Partition Manager = diskmgmt.msc
Display Properties = control desktop
Display Properties = desk.cpl
Display Properties (w/Appearance Tab Preselected ) = control color
Dr. Watson System Troubleshooting Utility = drwtsn32
Driver Verifier Utility = verifier

Ethereal ( if installed ) = ethereal
Event Viewer = eventvwr.msc
Files and Settings Transfer Tool = migwiz
File Signature Verification Tool = sigverif
Findfast = findfast.cpl
Firefox = firefox
Folders Properties = control folders
Fonts = fonts
Fonts Folder = fonts
Free Cell Card Game = freecell

Game Controllers = joy.cpl
Group Policy Editor ( xp pro ) = gpedit.msc
Hearts Card Game = mshearts
Help and Support = helpctr
Hyperterminal = hypertrm
Hotline Client = hotlineclient

Iexpress Wizard = iexpress
Indexing Service = ciadv.msc
Internet Connection Wizard = icwonn1
Internet Properties = inetcpl.cpl
Internet Setup Wizard = inetwiz
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 Properties = control keyboard

Local Security Settings = secpol.msc
Local Users and Groups = lusrmgr.msc
Logs You Out of Windows = logoff

Malicious Software Removal Tool = mrt
Microsoft Access ( if installed ) = access.cpl
Microsoft Chat = winchat
Microsoft Excel ( if installed ) = excel
Microsoft Diskpart = diskpart
Microsoft Frontpage ( if installed ) = frontpg
Microsoft Movie Maker = moviemk
Microsoft Management Console = mmc
Microsoft Narrator = narrator
Microsoft Paint = mspaint
Microsoft Powerpoint = powerpnt
Microsoft Word ( if installed ) = winword
Microsoft Syncronization Tool = mobsync
Minesweeper Game = winmine
Mouse Properties = control mouse
Mouse Properties = main.cpl
MS-Dos Editor = edit
MS-Dos FTP = ftp

Nero ( if installed ) = nero
Netmeeting = conf
Network Connections = control netconnections
Network Connections = ncpa.cpl
Network Setup Wizard = netsetup.cpl
Notepad = notepad
Nview Desktop Manager ( if installed ) = nvtuicpl.cpl

Object Packager = packager
ODBC Data Source Administrator = odbccp32
ODBC Data Source Administrator = odbccp32.cpl
On Screen Keyboard = osk
Opens AC3 Filter ( if installed ) = ac3filter.cpl
Outlook Express = msimn

Paint = pbrush
Password Properties = password.cpl
Performance Monitor = perfmon.msc
Performance Monitor = perfmon
Phone and Modem Options = telephon.cpl
Phone Dialer = dialer
Pinball Game = pinball
Power Configuration = powercfg.cpl
Printers and Faxes = control printers
Printers Folder = printers
Private Characters Editor = eudcedit

Quicktime ( if installed ) = quicktime.cpl
Quicktime Player ( if installed ) = quicktimeplayer

Real Player ( if installed ) = realplay
Regional Settings = intl.cpl
Registry Editor = regedit
Registry Editor = regedit32
Remote Access Phonebook = rasphone
Remote Desktop = mstsc
Removable Storage = ntmsmgr.msc
Removable Storage Operator Requests = ntmsoprq.msc
Resultant Set of Policy ( xp pro ) = rsop.msc

Scanners and Cameras = sticpl.cpl
Scheduled Tasks = control schedtasks
Security Center = wscui.cpl
Services = services.msc
Shared Folders = fsmgmt.msc
Sharing Session = rtcshare
Shuts Down Windows = shutdown
Sounds Recorder = sndrec32
Sounds and Audio = mmsys.cpl
Spider Solitare Card Game = spider
SQL Client Configuration = clicongf
System Configuration Editor = sysedit
System Configuration Utility = msconfig
System File Checker Utility ( Scan Immediately ) = sfc /scannow
System File Checker Utility ( Scan Once At Next Boot ) = sfc /scanonce
System File Checker Utility ( Scan On Every Boot ) = sfc /scanboot
System File Checker Utility ( Return to Default Settings) = sfc /revert
System File Checker Utility ( Purge File Cache ) = sfc /purgecache
System File Checker Utility ( Set Cache Size to Size x ) = sfc /cachesize=x
System Information = msinfo32
System Properties = sysdm.cpl

Task Manager = taskmgr
TCP Tester = tcptest
Telnet Client = telnet
Tweak UI ( if installed ) = tweakui
User Account Management = nusrmgr.cpl
Utility Manager = utilman

Volume Serial Number for C: = label
Volume Control = sndvol32
Windows Address Book = wab
Windows Address Book Import Utility = wabmig
Windows Backup Utility ( if installed ) = ntbackup
Windows Explorer = explorer
Windows Firewall = firewall.cpl
Windows Installer Details = msiexec
Windows Magnifier = magnify

Windows Management Infrastructure = wmimgmt.msc
Windows Media Player = wmplayer
Windows Messenger = msnsgs
Windows Picture Import Wizard (Need camera connected) = wiaacmgr
Windows System Security Tool = syskey
Windows Script host settings = wscript
Widnows Update Launches = wupdmgr
Windows Version ( shows your windows version ) = winver
Windows XP Tour Wizard = tourstart
Wordpad = write
Zoom Utility = igfxzoom

8/7/12

How to complie Linux Kernel 2.6

Step # 1 Get Latest Linux kernel code

Visit http://kernel.org/ and download the latest source code. File name would be linux-x.y.z.tar.bz2, where x.y.z is actual version number. For example file inux-2.6.25.tar.bz2 represents 2.6.25 kernel version. Use wget command to download kernel source code:

#root cd /tmp
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-x.y.z.tar.bz2 Note: Replace x.y.z with actual version number.

Step # 2 Extract tar (.tar.bz3) file

Type the following command:

# tar -xjvf linux-2.6.25.tar.bz2 -C /usr/src
# cd /usr/src
Install Location

#cd /usr/src
Step # 3 Configure kernel

Before you configure kernel make sure you have development tools (gcc compilers and related tools) are installed on your system. If gcc compiler and tools are not installed then use rpm command under Redhat Linux to install development tools.

#rpm -ivh gcc
Now you can start kernel configuration by typing any one of the command:

make menuconfig - Text based color menus, radiolists & dialogs. This option also useful on remote server if you wanna compile kernel remotely.

make xconfig - X windows (Qt) based configuration tool, works best under KDE desktop

make gconfig - X windows (Gtk) based configuration tool, works best under Gnome Dekstop. For example make menuconfig command launches following screen:

#make menuconfig
You have to select different options as per your need. Each configuration option has HELP button associated with it so select help button to get help.

Step # 4 Compile kernel

Start compiling to create a compressed kernel image, enter:

#make
Start compiling to kernel modules:

#make modules
Install kernel modules (become a root user, use su command):

#make modules_install
Step # 5 Install kernel

So far we have compiled kernel and installed kernel modules. It is time to install kernel itself.

#make install
It will install three files into /boot directory as well as modification to your kernel grub configuration file: System.map-2.6.25 config-2.6.25 vmlinuz-2.6.25

Step # 7 Modify Grub configuration file - /boot/grub/grub.lst

Open file using vi:

#vi /boot/grub/menu.lst
title Redhat Linux,kernel 2.6.25
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hdb1 ro
initrd /boot/initrd.img-2.6.25

update-grub

Step # 8 : Reboot computer and boot into your new kernel

Just issue reboot command:

#reboot

Linux Network Configuration

How to Configure Network on Linux

What are the RPM need to installed

kdenetwork-3.5.4-4.fc6
system-config-network-1.3.99-1.el5
system-config-network-tui-1.3.99-1.el5
kdenetwork-devel-3.5.4-4.fc6
Network Configuration File

#/etc/sysconfig/network-scripts/ifcfg-eth0
#/etc/sysconfig/network
Network Configuration Tool

system-config-network
system-config-network-gui
system-config-network-cmd
system-config-network-tui

What is service need to be started

service network restart/stop/start

Editing network Configuration File

maually assigning ip address
#vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
IPADDR=10.192.194.110
BOOTPROTO=static ("dhcp" when you want dhcp server ip address)
NETMASK=255.255.240.0
MII_NOT_SUPPORTED=yes
ONBOOT=yes
How add the Default Route Redhat Linux:

vi /etc/sysconfig/network
HOSTNAME=bgospc
GATEWAY=10.192.207.254
NETWORKING=yes

How add the Default Route in SuSe Linux:

#vi /etc/sysconfig/network/routes
default 10.192.207.254 - -
How to add DNS Server name and IP address

Add the entry to vi /etc/resolv.conf

#vi /etc/resolv.conf
search bg.emulex.com ad.emulex.com emulex.com wa.emulex.com sj.emulex.com ma.emulex.com co.emulex.com
nameserver 138.239.197.20
nameserver 138.239.197.101
nameserver 138.239.197.103

Linux Samba Server Configuration

How to Configure Samba Server on Linux

What RPM Need to be installed:

system-config-samba-1.2.39-1.el5
samba-common-3.0.23c-2
samba-3.0.23c-2
samba-client-3.0.23c-2
What is the Config File:

#/etc/samba/smb.conf
what is the service need to started

#service smb restart
Configure Samba Server:

Add the entry to vi /etc/samba/smb.conf

[samba-disk1]
comment = samba-disk1
path = /disk1
write list = root
valid users = root guest
create mask = 0664
directory mask = 0775
#save
Add the Samba user Paasword

#smbpasswd -a root
How mount samba clinet on Windows

start->run->//sambaserver ipaddress it will ask sambaserver username and password
How to mount samba client on Linux

mount.smbfs //sambaserver ipaddress/shared path /localpath

Ex:
mount.smbfs //10.192.192.189/samba-disk1 /disk1
or

mount //10.192.192.189/samba-disk1 /disk1 and it will ask samba server password
Note:The samba.winbind package need to installed for this future

8/6/12

Linux RSH Server configuration

How to install and configure RSH Server on Linux

What is the RPM need to Installed

rsh-server-0.17-37.el5
rsh-0.17-37.el5
What is the RSH Server Config File:

#/etc/xinetd.d/rsh
#/etc/xinetd.d/rlogin
#/etc/xinetd.d/rexec
#/etc/securetty
#/root/.rhosts
#/etc/hosts
What is the Service need to be start:

#root@localhost#service xinetd restart
How To install RSH Server RPM

#root@localhost#mount 10.192.194.110:/work /mnt (mount it on Your Linux machine)
#root@localhost#cd /mnt/rhel5132/Server/
#root@localhost#rpm -ivh rsh-server-4.xxx.rpm
How to configure RSH Server on Linux

#root@localhost#vi /etc/xinetd.d/rsh
#service shell
{
socket_type = stream
wait = no
user = root
log_on_success += USERID
log_on_failure += USERID
server = /usr/sbin/in.rshd
disable = yes
}
Note:change disable=yes to no and save
#root@localhost#vi /etc/xinetd.d/rlogin
service login
{
socket_type = stream
wait = no
user = root
log_on_success += USERID
log_on_failure += USERID
server = /usr/sbin/in.rlogind
disable = yes
}
Note:change disable=yes to no and save
#root@localhost#vi /etc/xinetd.d/rexec
service exec
{
socket_type = stream
wait = no
user = root
log_on_success += USERID
log_on_failure += USERID
server = /usr/sbin/in.rexecd
disable = yes
}
Note: Change disable=yes to no
#root@localhostservice xinetd restart (restart Service)
Add the Entry in vi /etc/securetty

#root@localhost#vi /etc/securetty
rsh
rlogin
rexec
#save restart service
#service xinetd restart
Add the entry vi /etc/hosts

#root@localhost#vi /etc/hosts
hostname ipaddress [ex rshserver]
hostname ipaddress [ex rsh client]
#save File
#root@localhost#vi /root/.rhosts
ipaddress root (ex:server)
ipaddress root (ex:client)
#save
#service xinetd restart (Restart the Service)
#chkconfig xinetd on
Make Sure to Stop Firewall Service:

#root@localhost#/etc/init.d/iptables stop
#root@localhost#/etc/init.d/iptables stop
#root@localhost#chkconfig iptables off
#root@localhost#chckconfig ip6tables off

Linux NFS Server Configuration

What is NFS Server

The Network File System (NFS) was developed to allow machines to mount a disk partition on a remote machine as if it were a local disk. It allows for fast, seamless sharing of files across a network

How to Configure NFSServer in Linux

#There is two way to configure NFS Server.
#Using NFS Server COnfiguration Tool (System-Config-NFS)
#manually Editing Configuration File vi /etc/exportfs
NFS Server Configuration Tool

#root@locathost#system-config-nfs
#Basic tab add the below details
#Directory — Specify the directory to share, such as /tmp.
#Host(s) — Specify the host(s) with which to share the directory.(bglinux or 138.239.197.10 or * to give everyone access)
#Basic permissions — Specify whether the directory should have read-only or read/write permissions.

#General tab->click checkbox Sync write operations on request
#Hide Filesystem beneath
Manually Editing NFS Server Configuration File vi /etc/exportfs

#root@localhost#vi /etc/exportfs
#root@localhost# /work *(ro,sync) (edit or delete and !wq save file)
#root@localhost#exportfs -a (reflect changes in NFS Server
Linux NFS configuration services

#root@localhost#etc/rc.d/init.d/portmap start
#root@localhost#/etc/rc.d/init.d/nfslock start
#root@localhost#/etc/rc.d/init.d/nfs start

Verify NFS Server is Running

#root@localhost#rpcinfo -p

FTP Server Configuration in Linux

Short for File Transfer Protocol, the protocol for exchanging files over the Internet or network.

How to start FTP Service

#root@localhost#/etc/init.d/vsftpd start
#root@localhost#/etc/init.d/vsftpd stop
#root@localhost#/etc/init.d/vsftpd restart

VSFTPD to start at boot you can use the chkconfig command
#root@localhost#chkconfig vsftpd on

Test the VSFTPD Server Status

#root@localhost#netstat -a | grep ftp
tcp 0 0 *:ftp *:* LISTEN
The vsftpd.conf File

VSFTPD only reads the contents of its vsftpd.conf configuration file you'll have to restart VSFTPD each time you edit the file in order for the changes to take effect. The file may be located in either the /etc or the /etc/vsftpd VSFTPD runs as an anonymous FTP server you want any remote user to log into to your default FTP directory using a username of anonymous and a password

#anon_root=/data/ftp
VSFTPD allows only anonymous FTP downloads to remote users, not uploads from them. This can be changed by modifying the anon_upload_enable VSFTPD doesn't allow anonymous users to create directories on your FTP server. You can change this by modifying the anon_mkdir_write_enable. VSFTPD logs FTP access to the /var/log/vsftpd.log log file. You can change this by modifying the xferlog_file directive. By default VSFTPD expects files for anonymous FTP to be placed in the /var/ftp directory

# Allow anonymous FTP?
anonymous_enable=YES
#The directory which vsftpd will try to change
#into after an anonymous login. (Default = /var/ftp)
anon_root=/data/directory
...
# Uncomment this to allow local users to log in.
local_enable=YES
...
#Uncomment this to enable any form of FTP write command.
#Needed even if you want local users to be able to upload files)
write_enable=YES
...
# Uncomment to allow the anonymous FTP user to upload files. This only
# has an effect if global write enable is activated. Also, you will
#obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
...
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
...
# Activate logging of uploads/downloads.
xferlog_enable=YES
...
# You may override where the log file goes if you like.
# The default is shown below.
xferlog_file=/var/log/vsftpd.log
Other vsftpd.conf Options

Limiting the maximum number of client connections (max_clients) Limiting the number of connections by source IP address (max_per_ip) The maximum rate of data transfer per anonymous login. (anon_max_rate) The maximum rate of data transfer per non-anonymous login. (local_max_rate)

The /etc/vsftpd.ftpusers File

you may restrict FTP access to certain users by adding them to the list of users in the /etc/vsftpd.ftpusers file

FTP Greeting Banner

ftpd_banner= Welcome to FTP Server

TFTP Server Configuration in Linux

TFTP Configuration File

/etc/xinetd.d/tftp
TFTP Server Service

service xinetd restart
How to configure TFTP Server for Linux

[root@bgpxetest ~]#vi /etc/xinetd.d/tftp
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot/
disable = yes (change to no)
per_source = 11
cps = 100 2
flags = IPv4
}
:wq
[root@bgpxetest ~]#service xinetd restart

Note: Pls make sure this Setting
Disable= yes change to NO
Server_args= -s /tftpboot pls make sure to change install path for while doing pxe installation
/tftpboot/linux-install

Loading Kernel Modules in Linux

Loading Kernel Modules

Linux allows the Kernel to be configured at run time, to enable or disable different services as you see fit

Module Commands

There are a few commands that allow you to maniuplate the kernel. Each is quickly described below, for more information say `man [command]`.
• depmod - handle dependency descriptions for loadable kernel modules.
• insmod - install loadable kernel module.
• lsmod - list loaded modules.
• modinfo - display information about a kernel module.
• modprobe - high level handling of loadable modules.
• rmmod - unload loadable modules

Using Module Commands

Below the different kernel module commands are demonstrated

# Show the module dependencies.
depmod -n

# Install some module

insmod [modname]
modprobe -v modename

# This lists all currently loaded modules, lsmod takes no useful parameters

lsmod

# Display information about module eepro100

modinfo modname

# Removing a module (don't use the example)

rmmod modname
modprobe -r modname

Module Configuration Files

The kernel modules can use two different methods of automatic loading. The first method (modules.conf) is my preferred method

/etc/modules.conf or /etc/modprobe.conf
/etc/rc.local