Windows_Commands


Essential Windows Commands for System Administration

Certificate Management in Windows Java

Generate a self-signed certificate:

bash
keytool -genkey -keyalg RSA -alias selfsigned -keystore keystore.jks -storepass password -validity 360 -keysize 2048

Update certificate in Windows Java:

bash
keytool -keystore mycacerts -storepass changeit -importcert -file ..\..\jre1.8.0_202\lib\security\cacerts

System Information and Network Commands

Display Driver Information:

dxdiagba

View All Open Ports:

netstat -a/-nap/-e/-n/-aon/-an/-b

Check Specific Port:

bnetstat -o -n -a | findstr 0.0:8080

Telnet to Check Port:

bash
telnet IP port

Trace Route:

bash
tracert IP

Reset Windows Firewall:

bash
netsh firewall reset

Kill Process by Process ID:

bash
taskkill /f /pid processID

Unshare Drive:

bas
net share D$ /delete

System Information:

bash
systeminfo

File Operations

Create File:

bash
copy con filename.txt

Create Multiple Empty Files:

bash
copy null filename.txt > null

Delete File:

bash
del <fileName>

Delete Empty Folder:

bash
rmdir <folderName>

Delete Non-Empty Folder and Subfolders:

bash
rmdir /q/s <folderName>

Oracle Database Commands

Backup Database without Data:

bash
exp userid=uname/pass@dbname file=e:\full_ddl.dmp rows=n

Backup Specific Table:

bash
exp userid=uname/pass@dbname tables=tbl_name file=e:\dump.dmp

MySQL Database Commands

Dump All Procedures without Data:

bash
mysqldump -u root -p -R --no-data > e:/dump.sql

Dump All Table Schemas without Data:

bash
mysqldump -u root -p -d --no-data > e:/dump.sql

Only Data Backup:

bash
mysqldump -u username -ppassword no-create-info database_name > dump.sql

Change MySQL Root Password:

bash
mysqladmin -u root password NEWPASSWORD

MySQL Admin Change Password:

bash
mysqladmin -u root -p'oldpassword' password newpass

MySQL Query Output to XML:

bash
mysql -u root -p --xml -e "mysql command"

Redirect MySQL Query Output to File:

bash
mysql> tee on mysql> tee filename mysql> query mysql> tee off

Get Last Month with Year:

sql
SELECT date_format(date_sub(now(), INTERVAL 1 MONTH),'%Y%m');

Android Development Commands

Install APK on Simulator:

bash
/androidSDK/platform-tools/adb install apkfilename

View Connected Devices:

bash
adb devices or adb shell

Reserved Ports and Protocols

PortProtocol
7Echo
21FTP
23Telnet
25SMTP
53DNS
70Gopher
79Finger
107RTelnet
110POP3
119NNTP
139NetBIOS
143IMAP
194IRC
3128, 8080, 10000, and etc.Various

No comments:

Post a Comment

Home

Mastering Java Interview Questions: Your Comprehensive Guide         If you're preparing for a Java interview or just lookin...