智能运维
-
shell流程控制
shell流程控制 if条件语句语法 # 单分支 if [ 条件1 ];then 动作1 动作2 动作3 fi if [ 条件1 ] then 动作1 动作2 动作3 fi [ 条件1 ] && { 动作1 动作2 动作3 } 双分支 if [ 条件1 ];then 动作1 动作2 动…
-
Hyper-V Ubuntu配置静态IP
1、打开Hyper-V功能后,系统会自动创建一个网卡“vEthernet (Default Switch)”。安装虚拟机时,在选择网卡步骤选择此默认网卡即可。安装的Ubuntu虚拟机通过此网卡,可以和宿主机Win10互通,也可以上网。安装的Ubuntu…
-
Hyper-V Linux挂载Win10目录
1、「找到要共享的文件夹/盘 > 右击文件夹/盘 > 选择属性 > 点开共享选项卡 > 选择高级共享 > 勾选共享此文件夹 > 点开权限 > 点击添加 > 可以指定一个用户或者直接用Everyone > 权限选…
-
Xshell连接Hyper-V Linux
1、安装ssh apt install openssh-server 2、修改ssh配置:vim /etc/ssh/sshd_config 把#PermitRootLogin prohibit-password改为PermitRootLogin yes 把#PasswordAuthentication yes改为PasswordAuthentication yes …
-
linux 安装 sysbench 和 使用
安装 执行 下载命令 curl -s https://packagecloud.io/install/repositories/akopytov/sysbench/script.rpm.sh | sudo bash 安装 sudo yum -y install sysbench 查看版本 sysbench --version 基于…
-
Windows Server 2016 时钟校对与时间同步
w32tm /query /status 这个命令能看到时间服务器地址是.68的机器就是域控服务器。 net stop w32time 先停止时间程序 w32tm /config /syncfromflags:manual /manualpeerlist:"0.pool.ntp.org, 1.pool.ntp.org,…
-
powershell配置自动补全
powershell配置自动补全 一、需求: 看到老师上课用mac命令行有自动补全功能,发现真的爽。但是自己的windows powershell不能使用自动补全功能。有了需求,就想找到能完成目前的任务,然后找到可以在powershell下面…
-
linux文件系统-/etc/profile.d
原理 /etc/profile文件中有如下一段脚本: if [ -d /etc/profile.d ]; then for i in /etc/profile.d/*.sh; do if [ -r $i ]; then . $i fi done unset i fi 在每次启动时,自动加载并执行/etc/profile.d 下的*.sh…
-
Ubuntu常用命令
一、开启串口 查看串口: ls /dev/ttyUSB* 临时开启串口权限(重启后无效): sudo chmod 777 /dev/ttyUSB0 永久给与权限: 1、查看串口归属于那个用户组 ls -l /dev/ttyUSB0 输出: 属于 dialout 用…