Windows cmd 命令 Flashcards

1
Q

显示当前所有环境变量

A

set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

暂停批处理,并显示出:按任意键继续

A

pause

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

查看1.txt的访问用户权限列表

A

cacls 1.txt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

设定d:\test.txt 拒绝hijack用户访问

A
cacls D:\test.txt /D hijack
参数:
/D 用户名:设定拒绝某用户访问
/P 用户名:perm:替换指定用户访问权限
/G 用户名:perm:赋予指定用户访问权限
 perm有:N-无,R-读,W-写,C-更改(写入),F-完全控制
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

重启所有Internet服务

A

iisreset /restart

这是一条命令,/并不是或的意思

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

显示1.txt的内容

A

type 1.txt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

在批处理文件中添加注释

A

REM 文本内容

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

删除映射对方到本地的为H:的映射

A

net use h: /del

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

我的ip是192.168.1.6,现在我已經远程登陆192.168.1.8上,要在其上面下载我自己电脑中的d:\server.exe 到192.168.1.8上的c:\server.exe

A

tftp -i 192.168.1.6 get d:\server.exe c:\server.exe

-i:以二进制传送

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

查看正在进行的工作

A

netstat -v

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

开对方telnet服务

A

net start telnet

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

重命名文件1.txt 为2.txt

A

ren 原名 新名

ren 1.txt 2.txt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

查看windows中hijack账户的属性

A

net user hijack

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

移动文件c:\hello.txt到d盘

A

move c:\hello.txt d:\

加参数\y 将取消确认而直接覆盖

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

在本地系统上启用(禁用)Internet服务

A

iisreset /enable或/disable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

重启win2k计算机

A

iisreset /reboot

(有提示:“系统将重启”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

把用户hijack添加到组administrator中

A

net localgroup Administrators hijack /add

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

ftp上传文件到服务器

A

ftp ip 端口
默认端口21
参数bin:二进制传送
参数ascii:ascii传送(适用于文本)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

某个计划任务id为9527,这项计划已经注册,现在要开启这个计划

A

at 9527

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

用guest用户登陆后将密码改为12345

A

net user guest 12345

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

向对方主机192.168.1.8发送大小为32字节的数据

A
ping ip(或域名)
参数:
-l 数据包大小
-n 发送数据次数
-t :一直ping
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

从批处理程序1.bat中调用另一个批处理程序2.bat

A

call 2.bat

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

显示系统网络设置

A

net config

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

删除目录c:\hello\及目录下所有子目录和文件

A
del /S /Q c:\\hello\
或用:
rmdir /S /Q c:\\hello\
/S:删除所有子目录和文件
/Q:免确认
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

查看协议使用情况(如tcp协议)

A

netstat -p 协议名

netstat -p tcp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

查看机器192.168.1.8局域网内开启了哪些共享

A

net view \192.168.1.8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

删除ipc$共享

A

net share ipc$ /del

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

向192.168.1.8发送死亡之ping

A

ping -t -l 65550 192.168.1.8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

检查磁盘D并现实状态报告

A

chkdsk /F D:

加参数/F修复磁盘上的错误

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

对方ip为192.168.1.8,想要得到对方的时间

A

net time \192.168.1.8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

查看目录下有哪些文件

A

dir

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

暂停某服务

A

net pause 服务名

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

把guest的密码改为lovechina

A

net user guest lovechina

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

强制结束某进程

A

kill -F 进程名

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

ipc直接登陆并映射对方C盘到本地的H盘

(用户名:hijack,密码:hello)

A

net use h: \ip\c$ “密码” /user:”用户名“

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

将Guest用户激活

A

net user guest /active:yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

显示当前日期

显示当前时间

A

date /t、time /t

/t:只显示当前时间,而不必输入新的时间日期

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

查看或更改本地网络配置情况

A

netsh

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

ipc已经登陆,登陆后映射对方C盘到本地H盘

A

net use h: \ip\c$

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

查看正在使用的所有协议使用情况

A

netstat -s

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

显示内存使用情况

A

mem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

更改cmd.exe的显示命令提示符(把C:\、D:\同意改为EntSky\)

A

prompt 名称

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

跟踪路由(数据包)(目标192.168.1.8)

A

tracert -参数 192.168.1.8
参数:
-w 数字:用于设置超时间隔

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

远程登陆windows服务器192.168.1.8

A

telnet 192.168.1.8
默认端口为23
如果对方更改了telnet端口,则:
telnet 192.168.1.8 端口

45
Q

更改telnet的端口为其他端口

A

键入tlntadmin,选择3,再选择8,就可以更改端口了

46
Q

查看端口的网络连接情况

A

netstat -n

常用netstat -an

47
Q

批处理问题

将hello world字符串保存到1.txt中

A

echo “hello world”&raquo_space; 1.txt

48
Q

删除ipc连接

A

net use \ip\ipc$ /del

49
Q

断开连接的共享

A

net logoff

50
Q

导出注册表

A

regedit /e 注册表文件名

51
Q

查看和处理arp缓存

A

arp -a将显示全部信息

52
Q

向192.168.1.8发送文本信息‘你好’

A

net send 192.168.1.8 “你好”

53
Q

设置cmd控制台前景和背景颜色

A

color 颜色值

54
Q

建立IPC空连接

A

net use \ip\ipc$ “密码” /user:”用户名”

55
Q

在aa.txt文件中寻找字符串hello

A

findstr “hello” aa.txt

56
Q

查看windows有哪些用户

A

net user

57
Q

更改CMD窗口标题名字为hello

A

title ‘hello’

58
Q

在屏幕上打印路由信息

A

route print

59
Q

停止某个已注册的计划任务(任务id:9527)

A

at 9527 /delete

60
Q

更改系统登陆密码为12345

A

net password 12345

61
Q

复制本地c:\srv.exe到对方(192.168.1.8)的admin下

A

copy c:\srv.exe $”>\192.168.1.8\admin$

62
Q

我的ip是192.168.1.6,现在我已經登陆在192.168.1.8上,要在其上面上传c:\server.exe到我自己的电脑

A

tftp -i 192.168.1.6 put c:\server.exe

63
Q

显示以字母p开头的所有环境变量

A

set p

64
Q

查找文件hello.txt

A

find hello.txt

65
Q

设置当启动,停止或重新启动internet服务时,若发生错误,将重新开机

A

iisreset /rebootonerror

66
Q

查看某文件(目录)的属性(如1.txt)

A

attrib 1.txt

67
Q

在屏幕上打印“hello world”

A

echo “hello world”

68
Q

限制hijack登陆电脑时间为周一至周五的8:00-17:00

之后再设置不限制hijack登陆时间

再设置hijack永远不能登陆

A

net user hijack/time:m-f,08:00-17:00
net user hijack/time:all
net user hijack/time

69
Q

连接到IP(192.168.1.6)(属于telnet登陆后的命令)

A

open 192.168.1.6

70
Q

查看开启了哪些服务

A

net start

71
Q

批处理问题:

打开或关闭echo

A

echo on或off

72
Q

使对方(192.168.1.8)在18:20分的时候执行开启telnet命令

A

at \192.168.1.8 18:20 net start telnet

73
Q

显示所有Internet服务状态

A

iisreset /status

74
Q

停止所有计划任务

A

at /delete

用参数/yes则不需要确认

75
Q

逐屏显示输出文件1.txt

A

more 1.txt

76
Q

建立IPC非空连接

A

net use \ip\ipc$ “密码” /user:”用户名”

77
Q

隐写术命令:

将2.zip隐藏到1.jpg中,生成3.jpg

A

copy /b 1.jpg+1.zip out.jpg

78
Q

删除只读文件hello.txt

A

del -F hello.txt

79
Q

替换文件

A

replace 源文件 要被替换的文件

80
Q

以树行列表显示进程

A

tlist -t

81
Q

开启某服务

停止某服务

A

net start 服务名

net stop 服务名

82
Q

调出任务管理器

A

taskmgr

83
Q

弹出一个窗口显示版本信息

A

winver

84
Q

新建用户:hijack密码为hello

A

net user hijack hello /add

85
Q

复制c:\1.txt 到d:\new1.txt

A

copy c:\1.txt d:\new1.txt

参数/y取消确认

86
Q

若无法停止Internet服务,将不会强制终止Internet服务

A

iisreset /noforce

87
Q

在DOS窗口下显示版本信息

A

ver

88
Q

从windows中删除用户hijack

A

net user hijack /delete

89
Q

推出cmd.exe

A

exit

参数/B:推出当前批处理脚本,而不是cmd.exe

90
Q

去掉或添加1.txt的只读属性

A

attrib 1.txt -R (或+R)

91
Q

设置环境变量

A

set 环境变量名=路径

92
Q

导入注册表

A

regedit /s 注册表文件名

参数/S:安静模式,无提示

93
Q

格式化磁盘

A

format 盘符 /FS:类型
如:Format D: /FS:NTFS
类型有:FAT32,NTFS等

94
Q

设置本地计算机时间与192.168.1.8主机的时间同步

A

net time \192.168.1.8 /set

参数/yes:免确认

95
Q

查看开启了哪些端口

A

netstat -a

常用netstat -an

96
Q

以树形结构显示目录

A

tree

参数-f:递归显示

97
Q

查看所有的计划任务

A

at

98
Q

远程查看用户登陆信息

A

finger hijack@192.168.1.8

99
Q

本地C盘下的index.htm复制到192.168.1.8的C盘

A

copy index.htm \192.168.1.8\c$\index.htm

100
Q

查看本地开启的共享

A

net share

101
Q

对方136-139其中一个端口已开,现在要查看对方最近登陆的用户名(对方ip为192.168.1.8)

A

nbstat -A 192.168.1.8

注意:参数A要大写

102
Q

为可执行文件设置一个路径

A

path 路径\可执行文件名

103
Q

创建文件夹hello

A

md hello

104
Q

新开一个新窗口并最大化(最小化)运行某程序或命令

A

start calc.exe /mac 或/min

105
Q

对比1.txt和2.txt,并把不同之处输出到3.txt中

A

fc 1.txt 2.txt >3.txt

106
Q

开启ipc$共享

A

net share ipc$

107
Q

删除C盘共享

A

net share c$ /del

108
Q

批处理问题:

将cmd.exe导向到批处理程序中带标签的行

A

goto :start

标签必须单独一行,以冒号开头,如:
:start #这就是一个标签

109
Q

启动(停止)所有Internet服务

A

iisreset /start 或 stop