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:
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:
Trace Route:
Reset Windows Firewall:
Kill Process by Process ID:
bash
taskkill /f /pid processID
Unshare Drive:
System Information:
File Operations
Create File:
bash
copy con filename.txt
Create Multiple Empty Files:
bash
copy null filename.txt > null
Delete File:
Delete Empty Folder:
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
Port | Protocol |
---|
7 | Echo |
21 | FTP |
23 | Telnet |
25 | SMTP |
53 | DNS |
70 | Gopher |
79 | Finger |
107 | RTelnet |
110 | POP3 |
119 | NNTP |
139 | NetBIOS |
143 | IMAP |
194 | IRC |
3128, 8080, 10000, and etc. | Various
|
No comments:
Post a Comment