get started
命令 |
Windows Command |
*nix Shell |
||
File |
List Directory |
dir |
ls |
|
Make Directory |
mkdir |
mkdir |
||
Change Directory |
cd或chdir |
cd |
||
Copy Directory |
xcopy |
cp -r |
||
Remove Directory |
rmdir或rd |
rmdir或rm -r |
||
File Tree |
tree |
ls -R |
||
Create or Update File |
echo “” > filename (use IO redirect) |
touch |
||
Delete(Remove) File |
del或erase |
rm |
||
Copy File |
copy |
cp |
||
Make Link |
mklink |
ln |
||
Move(Rename) File |
move或ren或rename |
mv或rename |
||
Compare File |
comp fc /l(ASCII letter) fc /u(Unicode letter) |
diff(line
by line) |
||
File Attribute |
attrib(Attribute) cacls或icacls(ACL) |
chmod(Change Mode) chown(Change Owner) chgrp(Change Group) |
||
Match String |
find |
grep |
||
Sort Text File |
sort |
sort |
||
I/O |
Output File |
type |
cat |
|
More Display |
more |
more或less |
||
Clear Screen |
cls |
clear |
||
Output |
echo |
echo |
||
Redirect > Output,>> Output(append);< Input,<<Input(append) |
||||
System |
Date and Time |
date和time |
date |
|
Location of App |
where |
which或whereis |
||
Help Manual |
help |
help或info或man |
||
Variable |
set |
set |
||
Host Name |
hostname |
hostname |
||
Shutdown |
shutdown |
/s |
shutdown
|
|
Service |
Service Controller |
sc(CLI) |
service(script
in /etc/init.d) |
|
Service Status |
sc query <service> sc queryex <service> |
service <service> status |
||
Start Service |
net start <service> sc start <service> |
service <service> start systemctl start <service> |
||
Stop Service |
net stop <service> sc stop <service> |
service <service> stop service stop <service> |
||
Service Status |
sc query <service> sc queryex <service> |
service <service> status |
||
Pause Service |
net pause <service> sc pause <service> |
Don’t Have |
||
Continue Service |
net
continue <service> |
|||
Create Service |
sc create <service> |
|||
Delete Service |
sc delete <service> |
|||
Config Service |
sc qc <service> (query configuration) sc config <service> |
chkconfig |
||
User |
Add User |
net user <username> [password] /add |
useradd <username> |
|
Delete User |
net user <username> /delete |
userdel <username> |
||
Add Group |
net
group <groupname> /add |
groupadd |
||
Delete Group |
net
group <groupname> /delete |
groupdel |
||
Set Password |
net user <username> [password] |
passwd |
||
Query Users |
query user quser query session qwinsta |
who或w |
||
Current User |
whoami |
whoami |
||
Log Off |
logoff |
|
||
Send Message to Others |
msg |
write |
||
Process |
Process Info |
tasklist query process qprocess |
ps(process
snapshot) |
|
Kill Process |
taskkill或tskill |
kill |
||
Schedule Task |
at和schtasks |
at和crontab |
||
Start Task(Job) |
start |
fg(foreground) |
||
Network |
PING |
ping |
ping |
|
Trace Route |
pathping或tracert |
traceroute |
||
Network Interface |
ipconfig |
ifconfig |
||
Route Table |
route |
route |
||
DNS |
nslookup |
nslookup |
||
Net Statistics |
netstat |
netstat |
||
ARP Table |
arp |
arp |
||
FTP Client |
ftp |
ftp |
||
TFTP |
tftp |
tftp |
||
Telnet |
telnet |
telnet |
||
Login Client |
mstsc |
ssh |
||