本文介绍如何解决Windows异常关机重启。
1.使用快捷按键win R,运行输入gpedit.msc
2.在弹出的页面中双击进入“计算机配置”。
3.在计算机配置页面中双击打开右侧的“管理模板”。
4.在管理模板页面下双击打开“系统”选项。
5.在该页面中找到“关机选项”,并双击打开。
6.将右侧页面中的“关闭会阻止或取消关机的应用程序的自动终止功能”双击打开选择“已启用”后应用并确定。
在使用Windows 10电脑的过程中,都曾遇到过系统自带的应用程序无法打开的情况,甚至重启电脑之后依然无法成功启用,本文将针对此问题进行详细说明。
1.使用“win R”快捷键,打开运行窗口,输入services.msc,然后回车。
2.进入服务界面,找到“Windows Update服务”,鼠标右击,选择“停止”。
3.停止“Windows Update服务”之后,进入“C盘”点击“Windows路径”,找到“SoftwareDistribution”文件夹,然后重命名文件夹,重命名为:“SoftwareDistribution”。
4.重命名完后,进入服务界面,找到“Windows Update服务”,鼠标右击,选择“启动”。
5.使用“win R”快捷键,打开运行窗口,输入wsreset,然后回车,清理应用商店缓存。
6.清理完成,重启电脑,Windows10系统自带的应用就可以正常打开了。
centos系统如何查看当前登录用户信息?本教程以centos7系统为例
本配置适用于centos6,7版本
1. 使用w命令查看登录用户正在使用的进程信息
w命令用于显示已经登录系统的用户的名称,以及他们正在做的事。该命令所使用的信息来源于/var/run/utmp文件。w命令输出的信息包括:
用户名称
用户的机器名称或tty号
远程主机地址
用户登录系统的时间
空闲时间(作用不大)
附加到tty(终端)的进程所用的时间(JCPU时间)
当前进程所用时间(PCPU时间)
用户当前正在使用的命令
w命令还可以使用以下选项
-h忽略头文件信息
-u显示结果的加载时间
-s不显示JCPU, PCPU, 登录时间
2.使用who命令查看(登录)用户名称及所启动的进程
who命令用于列举出当前已登录系统的用户名称。其输出为:用户名、tty号、时间日期、主机地址。
Windows10系统文件保护功能是开启的,而且经常会弹出提示,让人感到烦恼。文件保护是自带的机制,如果你想要关闭此功能是可以的,本文将针对此问题进行详细说明。
1.在Windows10系统中,使用“WIN R”打开运行窗口输入gpedit.msc,然后回车。
2.在“本地组策略编辑器”窗口的左侧小窗口中,依次展开“计算机配置”-“管理模版”-“系统”,然后在右侧窗口中找到“Windows 文件保护”。
3.双击“Windows 文件保护”,点击“设置Windows文件保护扫描”,再点击“策略设置”选项命令。
4.在弹出的窗口,将其设置更改为“已禁用”选项,先点击“应用”然后点击“确定”退出即可。
debian8系统如何用uniq命令删除文件中的重复行?本教程以debian8系统为例
本配置适用于debian8,9版本
1.uniq检查及删除文本文件中重复出现的行列
语 法:uniq [-cdu][-f<栏位>][-s<字符位置>][-w<字符位置>][--help][--version][输入文件][输出文件]
补充说明:uniq 可检查文本文件中重复出现的行列。
2.参 数:
-c 或--count 在每列旁边显示该行重复出现的次数。
-d 或--repeated 仅显示重复出现的行列。
-f<栏位>或--skip-fields=<栏位> 忽略比较指定的栏位。
-s<字符位置>或--skip-chars=<字符位置> 忽略比较指定的字符。
-u 或--unique 仅显示出一次的行列。
-w<字符位置>或--check-chars=<字符位置> 指定要比较的字符。
--help 显示帮助。
--version 显示版本信息。
[输入文件] 指定已排序好的文本文件。
[输出文件] 指定输出的文件。
3.例如:查看文件file3中重复行数据的内容
#查看文件file3文件内容
[root@localhost ~]# uniq -d file3
aaa
#file3文件中重复行数据的内容为aaa
查看文件file3中不重复行数据的内容
[root@localhost ~]# uniq -u file3
bbb
显示file3文件每行连续出现的次数
[root@localhost ~]# uniq -c file3
2 aaa
1 bbb
显示file3文件所有重复的行,每个重复的行都显示
[root@localhost ~]# uniq -D file3
aaa
aaa
一般情况下都只有一个网卡和一个ip地址,那么windows系统如何在一个网卡上配置多个IP的问题呢?本文将针对此问题进行详细说明。
1.右击右下角宽带连接标志选择“打开网络和共享中心”。
2.选择“更改配适器设置”。
3.右击本地网络,选择“属性”,然后选择“Internet协议版本4(TCP/IPv4)”。
4.在Internet协议版本4(TCP/IPv4)属性窗口点击“高级”。
5.在弹出的界面点击“添加”按钮。
使用快捷键“win r”打开“运行”窗口输入“cmd”,然后在弹出的窗口里面输入“ipconfig”查看IP跟网关是否有添加进去,然后并进行测试。
——————————END——————————
debian8系统如何编辑文件sources.list更换下载源?本教程以debian8系统为例
本配置适用于debian8,9版本
1.编辑sources.list文本
vi /etc/apt/sources.list
可以把之前的文本源拷贝到其他地方或者前面打#号
这边我打#号处理
2.更换源文本到sources.list文件上
163镜像站
deb http://mirrors.163.com/debian/ stretch main non-free contrib
deb http://mirrors.163.com/debian/ stretch-updates main non-free contrib
deb http://mirrors.163.com/debian/ stretch-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib
deb-src http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib
中科大镜像站
deb https://mirrors.ustc.edu.cn/debian/ stretch main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ stretch main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ stretch-updates main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ stretch-updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ stretch-backports main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ stretch-backports main contrib non-free
deb https://mirrors.ustc.edu.cn/debian-security/ stretch/updates main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian-security/ stretch/updates main contrib non-free
阿里云镜像站
deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb http://mirrors.aliyun.com/debian-security stretch/updates main
deb-src http://mirrors.aliyun.com/debian-security stretch/updates main
deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib
华为镜像站
deb https://mirrors.huaweicloud.com/debian/ stretch main contrib non-free
deb-src https://mirrors.huaweicloud.com/debian/ stretch main contrib non-free
deb https://mirrors.huaweicloud.com/debian/ stretch-updates main contrib non-free
deb-src https://mirrors.huaweicloud.com/debian/ stretch-updates main contrib non-free
deb https://mirrors.huaweicloud.com/debian/ stretch-backports main contrib non-free
deb-src https://mirrors.huaweicloud.com/debian/ stretch-backports main contrib non-free
清华大学镜像站
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security/ stretch/updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security/ stretch/updates main contrib non-free
兰州大学镜像站
deb http://mirror.lzu.edu.cn/debian stable main contrib non-free
deb-src http://mirror.lzu.edu.cn/debian stable main contrib non-free
deb http://mirror.lzu.edu.cn/debian stable-updates main contrib non-free
deb-src http://mirror.lzu.edu.cn/debian stable-updates main contrib non-free
deb http://mirror.lzu.edu.cn/debian/ stretch-backports main contrib non-free
deb-src http://mirror.lzu.edu.cn/debian/ stretch-backports main contrib non-free
deb http://mirror.lzu.edu.cn/debian-security/ stretch/updates main contrib non-free
deb-src http://mirror.lzu.edu.cn/debian-security/ stretch/updates main contrib non-free
上海交大镜像站
deb https://mirror.sjtu.edu.cn/debian/ stretch main contrib non-free
deb-src https://mirror.sjtu.edu.cn/debian/ stretch main contrib non-free
deb https://mirror.sjtu.edu.cn/debian/ stretch-updates main contrib non-free
deb-src https://mirror.sjtu.edu.cn/debian/ stretch-updates main contrib non-free
deb https://mirror.sjtu.edu.cn/debian/ stretch-backports main contrib non-free
deb-src https://mirror.sjtu.edu.cn/debian/ stretch-backports main contrib non-free
deb https://mirror.sjtu.edu.cn/debian-security/ stretch/updates main contrib non-free
deb-src https://mirror.sjtu.edu.cn/debian-security/ stretch/updates main contrib non-free
以上是各类源的文本
1.这边举例为163源替换上去
文件保存退出
2.更新源
apt-get update
即可更换成功
debian8系统如何用lsmod命令显示已载入系统的模块?本教程以debian8系统为例
本配置适用于debian8,9版本
1.介绍
lsmod功能说明:显示已载入系统的模块。
2.例子
lsmod
使用 lsmod 之后,系统会显示出目前已经存在于核心当中的模组,显示的内容包括有:
* 模组名称(Module);
* 模组的大小(size);
* 此模组是否被其他模组所使用 (Used by)。
1.uname -a(查看版本当前操作系统内核信息)
2.cat /etc/issue
3.cat /etc/os-release(查看版本当前操作系统发行版信息。这个命令就可以清楚的知道到底是RedHat的、还是别的发行版,还有具体的版本号,比如3.4还是5.4等等。)
4.cat /proc/cpuinfo(查看cpu相关信息,包括型号、主频、内核信息等)
5.getconf LONG_BIT(Debian查看版本说明当前CPU运行在32bit模式下, 但不代表CPU不支持64bit)
6.lsb_release -a
debian8系统如何用ispell检查文件中出现的拼写错误?本教程以debian8系统为例
本配置适用于debian8,9版本
1.Linux ispell命令用于拼写检查程序。
2.参数:
-a 当其他程序输出送到ispell时,必须使用此参数。
-A 读取到"&Include File&"字符串时,就去检查字符串后所指定文件的内容。
-b 产生备份文件,文件名为.bak。
-B 检查连字错误。
-C 不检查连字错误。
-d<字典文件> 指定字典文件。
-l 从标准输入设备读取字符串,结束后显示拼错的词汇。
-L<行数> 指定内文显示的行数。
-m 自动考虑字尾的变化。
-M 进入ispell后,在画面下方显示指令的按键。
-n 检查的文件为noff或troff的格式。
-N 进入ispell后,在画面下方不显示指令的按键。
-p<字典文件> 指定个人字典文件。
-P 不考虑字尾变化的情形。
-S 不排序建议取代的词汇。
-t 检查的文件为TeX或LaTeX的格式。
-V 非ANSI标准的字符会以"M-^"的方式来显示。
-w<非字母字符> 检查时,特别挑出含有指定的字符。
-W<字符串长度> 不检查指定长度的词汇。
-x 不要产生备份文件。
命令:ispell [要检查的文件]
3.debian系统不包含ispell所以第一步需要先安装
apt-get install ispell -y
4.这边已file这个文件为例
ispell file
本例中,检查出speet,netwoek 错误,并提示纠正信息,此时输入"0",即使用sheet 来纠正错误,同时继续显示下一个错误,直到所有的错误显示完毕。