一、登录服务器指令
1、SSH:用于以SSH协议登录远程服务器。
ssh username@hostname
2、Telnet:用于以Telnet协议登录远程服务器。
telnet hostname [port]
二、用户管理指令
1、添加用户
Linux:
useradd [options] username
Windows:
net user username password /add
2、删除用户
Linux:
userdel [options] username
Windows:
net user username /delete
3、修改用户密码
Linux:
passwd username
Windows:
net user username newpassword
4、查看用户信息
Linux:
id username
Windows:
net user username
三、进程管理指令
1、查看进程
Linux:
ps [options]
Windows:
tasklist
2、终止进程
Linux:
kill [options] PID
Windows:
taskkill /PID PID /F
四、系统信息指令
1、查看系统内核和硬件信息
Linux:
uname -a
Windows:
systeminfo
2、查看磁盘空间使用情况
Linux:
df [options]
Windows:
wmic logicaldisk get size,freespace,caption
3、查看内存使用情况
Linux:
free [options]
Windows:
systeminfo | findstr /C:"可用的物理内存" /C:"总的物理内存"
五、文件管理指令
1、列出目录内容
Linux:
ls [options] [directory]
Windows:
dir [drive:][path][filename] [options]
2、切换当前工作目录
Linux:
cd [directory]
Windows:
cd [drive:][path]
3、复制文件或目录
Linux:
cp [options] source destination
Windows:
copy source destination
4、移动文件或目录
Linux:
mv [options] source destination
Windows:
move source destination
5、删除文件或目录
Linux:
rm [options] files
Windows:
del files
6、创建新目录
Linux:
mkdir [options] dirs
Windows:
mkdir [drive:]path
7、删除空目录
Linux:
rmdir [options] dirs
Windows:
rmdir [drive:]path
8、文件权限设置
Linux:
chmod [options] mode files
Windows:(通过icacls命令)
icacls file [options]
六、网络管理指令
1、查看网络配置信息
Linux:
ifconfig [interface]
Windows:
ipconfig [/all]
2、查看和配置路由表信息
Linux:
route [options]
Windows:
route [print | delete | add | change] [options]
3、测试网络连通性
Linux and Windows:
ping host [options] count(number)
Windows:
tracert host [options] count(number) hmax(number) wtimeout(number) interface(address) tos(number) [dtos(number)] [verbose] [src(address)] [www (lookup address)] [rw (route wrapper)] [frag (do not fragment)] [rs (record route)] [tt (trace time)] [par (parse results)] [ns (name server)] [dc (don't fragment)] [pmtu (use minimum MTU)] [win (set window size)] [initial (initial TOS value)] [new (new routing table)] [exit (exit trace)] [overwrite] [definit (default gateway)] [retry (retry count)] [gateway (gateway address)] [gw (gateway address)] [if (interface)] [dst (destination address)] [src (source address)] [tos (type of service)] [ww (wait for response)] [fragment (fragment packets)] [frag (fragment packets)] [rs (record route)] [tt (trace time)] [par (parse results)] [ns (name server)] [dc (don't fragment)] [pmtu (use minimum MTU)] [win (set window size)] [initial (initial TOS value)] [new (new routing table)] [exit (exit trace)] [overwrite] [definit (default gateway)] [retry (retry count)] [gateway (gateway address)] [gw (gateway address)] [if (interface)] [dst (destination address)] [src (source address)] [tos (type of service)] [ww (wait for response)] [fragment (fragment packets)] [frag (fragment packets)] [rs (record route)] [tt (trace time)] [par (parse results)] [ns (name server)] [dc (don't fragment)] [pmtu (use minimum MTU)] [win (set window size)] [initial (initial TOS value)] [new (new routing table)] [exit (exit trace)] [overwrite] [definit (default gateway)] [retry (retry count)] [gateway (gateway address)] [gw (gateway address)] [if (interface)] [dst (destination address)] [src (source address)] [tos (type of service)] [ww (wait for response)] [fragment (fragment packets)] [frag (fragment packets)] [rs (record route)] [tt (trace time)] [par (parse结果)] [ns (name server)] [dc (don't fragment))] [pmtu (use minimum MTU)] [win (set window size)] [initial (initial TOS value)] [new (new routing table)] [exit (exit trace)] [overwrite] [definit (default gateway)] [retry (retry count)] [gateway (gateway address)] [gw (gateway address)] [if (interface)] [dst (destination address)] [src (source address)] [tos (type of service)] [ww (wait for response)] [fragment (fragment packets)] [frag (fragment packets)] [rs (record route)] [tt (trace time)] [par (parse结果)] [ns (name server)] [dc (don't fragment))] [pmtu (use minimum MTU)] [win (set window size)] [initial (initial TOS value)] [new (new routing table)] [exit (exit trace)] [overwrite] [definit (default gateway)] [retry (retry count)] [gateway (gateway address)] [gw (gateway address)] [if (interface)] [dst (destination address)] [src (source地址)] [tos (type of service)] [ww (wait for response)] [fragment (fragment packets)] [frag (fragment packets)] [rs (record route)] [tt (trace time)] [par (parse结果)] [ns (name server)] [dc (don't fragment))] [pmtu (use minimum MTU)] [win (set window size)] [initial (initial TOS值)] [new (new routing table)] [exit (exit trace)] [overwrite] [definit (default gateway)] [retry (retry count)] [gateway (gateway address)] [gw (gateway address)] [if (interface)] [dst (destination address)] [src (source地址)] [tos (type of service)] [ww (wait for response)] [fragment (fragment packets)] [frag (fragment packets)] [rs (record route)] [tt (trace时间)] [par (parse结果)] [ns (name server)] [dc (don't fragment))] [pmtu (use minimum MTU)] [win (set window size)] [initial (initial TOS值)] [new (new routing table)] [exit (exit trace)] [overwrite] [definit (default gateway)] [retry (retry count)] [gateway (gateway address)] [gw (gateway address)] [if (interface)] [dst (destination address)] [src (source地址)] [tos (type of service)] [ww (wait for response)] [fragment (fragment packets)] [frag (fragment packets)] [rs (record route)] [tt (trace时间)] [par (parse结果)] [ns (name server)] [dc (don't fragment))] [pmtu (use minimum MTU)] [win (set window size)] [initial (initial TOS值)] [new (new routing table)] [exit (exit trace)] [overwrite] [definit (default gateway)] [retry (retry count)] [gateway (gateway address)] [gw (gateway address)] [if (interface)] [dst (destination address)] [src (source地址)] [tos (type ofservice)] [ww (wait for response)] [fragment (fragment packets)] [frag (fragment packets)] [rs (record route)] [tt (trace时间)] [par (parse结果)] [ns (name server)] [dc (don't fragment))] [pmtu (use minimum MTU)] [win (set window size)] [initial (initial TOS值)] [new (new routing table)] [exit (exit trace)] [overwrite] [definit (default gateway)] [retry (retry count)] [gateway (gateway address)] [gw (gateway address)] [if (interface)] [dst (destination address)] [src (source地址)] [tos (type ofservice)] [ww (wait for response)] [fragment (fragment packets)] [frag (fragment packets)] [rs (record route)] [tt (trace时间)] [par (parse结果)] [ns (name server)] [dc (don't fragment))] [pmtu (use minimum MTU)] [win (set window大小)] [initial (initial TOS值)] [new (new routing table)] [exit (exit trace)] [overwrite] [definit (default gateway)] [retry (retry count)] [gateway (gateway address)] [gw (gateway address)] [if (interface)] [dst (destination address)] [src (source地址)] [tos (type ofservice)] [ww (wait for response)] [fragment (fragment packets)] [frag (fragment packets)] [rs (record route)] [tt(trace时间)] par(解析结果)[ns(名称服务器)] dc(不分段)] pmtu(使用最小MTU)[win(设置窗口大小)] initial(初始TOS值)[new(新路由表)] exit(退出跟踪)[overwrite(覆盖)] definit(默认网关)[retry(重试次数)] gateway(网关地址)[gw(网关地址)][if(接口)][dst(目标地址)][src(源地址)][tos(类型服务)][ww(等待响应)][fragment(分片包)][frag(分片包)][rs(记录路由)][tt(跟踪时间)][par(解析结果)][ns(名称服务器)][dc(不分段)][pmtu(使用最小MTU)][win(设置窗口大小)][initial(initial TOS值)][new(new routing table)][exit(exit trace)][overwrite(覆盖)][definit(default gateway)][retry(重try count)][gateway(gateway address)][gw(gateway address)][if(interface)][dst(destination address)][src(source地址)][tos(type of service)][ww(wait for response)][fragment(fragment packets)][frag(fragment packets)][rs(record route)][tt(trace time)][par(parse结果)][ns(name server)][dc(don't fragment)][pmtu(use minimum MTU)][win(set window size)][initial(initial TOS值)][new(new routing table)][exit(exit trace)][overwrite(覆盖)][definit(default gateway)][retry(retry count)][gateway(gateway address)][gw(gateway address)][if(interface)][dst(destination address)][src(source地址)][tos(type of service)][ww(wait for response)][fragment(fragment packets)][frag(fragment packets)][rs(record route)][tt(trace time)][par(parse结果)][ns(name server)][dc(don't fragment)][pmtu(use minimum MTU)][win(set window大小)] initial(initial TOS值)[new(new routing table)] exit(exit trace)] overwrite(覆盖)definit(default gateway)[retry(重试次数)] gateway(网关地址)[gw(gateway地址)][if(interface)] dst(destination address)[src(source地址)][tos(type of service)][ww(wait for response)] fragment(fragment packets)[frag(fragment packets)] rs(record route)[tt(trace时间)] par(解析结果)[ns(名称服务器)][dc(don't fragment)][pmtu(use minimum MTU)][win(set window大小)] initial(initial TOS值)[new(new routing table)] exit(exit trace)] overwrite(覆盖)definit(default gateway)[retry(重try count)] gateway(gateway address)[gw(gateway address)][if(interface)] dst(destination address)[src(source地址)] tos(type of service)[ww(wait for response)] fragment(fragment packets)[frag(fragment packets)] rs(record route)[tt(trace时间)] par(解析结果)[ns(name server)][dc(don't fragment)][pmtu(use minimum MTU)] win(set window大小)] initial(initial TOS值)[new(new routing table)] exit(exit track)] overwrite(覆盖)definit(default gateway)[retry(重try count)] gateway(gateway address)[gw(gateway address)][if(interface)] dst(destination address)[src(source地址)] tos(type of service)[ww(wait for response)] fragment(fragment packets)[frag(fragment packets)] rs(record route)[tt(trace时间)] par(解析结果)[ns(name server)] dc(don't fragment)][pmtu(use minimum MTU)][win(set window大小)] initial(initial TOS值)[new(new routing table)] exit(exit trace)] overwrite(覆盖)definit(default gateway)[retry(重try count)] gateway(gateway address)[gw(gateway address)][if(interface)] dst(destination address)[src(source地址)] tos(type of service)[ww(wait for response)] fragment(fragment packets)[frag(fragment packets)] rs(record route)[tt(trace时间)] par(解析结果)[ns(name server)] dc(don't fragment)][pmtu(use minimum MTU)][win(set window大小)] initial(initial TOS值)[new(new routing table)] exit(exit trace)] overwrite(覆盖)definit(default gateway)[retry(重try count)] gateway(gateway address)[gw(gateway address)][if(interface)] dst(destination address)[src(source地址)] tos(type of service)[ww(wait for response)] fragment(fragment packets)[frag(fragment packets)] rs(record route)[tt(trace时间)] par(解析结果)[ns(name server)] dc(don't fragment)][pmtu(use minimum MTU)][win(set window大小)] initial(initial TOS值)[new(new routing table)] exit(exit trace)] overwrite(覆盖)definit(default gateway)[retry(重try count)] gateway(gateway address)[gw(gateway address)][if(interface)] dst(destination地址)[src(source地址)] tos(type of service)[ww(wait for response)] fragment(fragment packets)[frag(fragment packets)] rs(record route)[tt(trace时间)] par(解析结果)。
以上内容就是解答有关“服务器管理指令大全”的详细内容了,我相信这篇文章可以为您解决一些疑惑,有任何问题欢迎留言反馈,谢谢阅读。
原创文章,作者:K-seo,如若转载,请注明出处:https://www.kdun.cn/ask/771672.html