随笔分类 - linux shell
摘要:1、查看状态 root@DESKTOP-1N42TVH:/home# ufw status ## 开启状态 Status: active 2、关闭防火墙 root@DESKTOP-1N42TVH:/home# ufw disable Firewall stopped and disabled on
阅读全文
摘要:1、win + r wslconfig /l 2、执行如下命令 wslconfig /u Ubuntu 3、检查 wslconfig /l
阅读全文
摘要:1、问题,执行apt-get update时出现如下报错: Err:1 http://archive.ubuntu.com/ubuntu focal InRelease 2、
阅读全文
摘要:1、 root@DESKTOP-1N42TVH:/home/test# ls root@DESKTOP-1N42TVH:/home/test# ls /home/test2/* /home/test2/a.txt /home/test2/test.sh root@DESKTOP-1N42TVH:/h
阅读全文
摘要:来源: https://blog.csdn.net/weixin_45579994/article/details/112386425 WSL2默认可以使用的内存大小为主机的80%,对于Linux而言即使装了桌面,一般的开发也没必要给这么多内存,分多了,反而有可能卡主机的Windows操作:1.打开
阅读全文
摘要:001、 root@DESKTOP-1N42TVH:/home/test2# ls outcome.ped root@DESKTOP-1N42TVH:/home/test2# cat outcome.ped G G C C G G T T G G C C G G T G G G C C A A T
阅读全文
摘要:1、测试数据 root@DESKTOP-1N42TVH:/home/test2# ls test.txt root@DESKTOP-1N42TVH:/home/test2# cat test.txt i j k s root@DESKTOP-1N42TVH:/home/test2# sed -n l
阅读全文
摘要:1、测试数据 root@DESKTOP-1N42TVH:/home/test2# ls test.txt root@DESKTOP-1N42TVH:/home/test2# cat test.txt i j k x c b z c b e g a 2、输出行序号 root@DESKTOP-1N42T
阅读全文
摘要:1、测试数据 root@DESKTOP-1N42TVH:/home/test2# ls a.txt root@DESKTOP-1N42TVH:/home/test2# cat a.txt ## 测试数据 d eee j x ee u d eeeee d a e u k q j eeee sj a d
阅读全文
摘要:1、测试数据 root@DESKTOP-1N42TVH:/home/test2# ls a.txt root@DESKTOP-1N42TVH:/home/test2# cat a.txt d ees j x e.s u z e s u w e s u root@DESKTOP-1N42TVH:/ho
阅读全文
摘要:1、测试数据 root@DESKTOP-1N42TVH:/home/test2# ls a.txt root@DESKTOP-1N42TVH:/home/test2# cat a.txt d ees j x e.s u z e s u w e s u root@DESKTOP-1N42TVH:/ho
阅读全文
摘要:1、linux 中 grep -q选项表示静默输出, 即不显式匹配结果 root@DESKTOP-1N42TVH:/home/test2# ls a.txt root@DESKTOP-1N42TVH:/home/test2# cat a.txt ## 测试数据 d e j s q u z c b r
阅读全文
摘要:1、 root@DESKTOP-1N42TVH:~# echo "/etc/init.d/ssh start" >> /etc/profile
阅读全文
摘要:1、问题 -bash: /mnt/c/Windows/System32/drivers/etc/hosts: Permission denied 2、解决方法 右击,选属性 选安全: 选Users: 点编辑: 点users: 选完全控制: 选应用: 选是: 3、测试效果 可以修改了。
阅读全文
摘要:形式1、curl xxxx > result root@DESKTOP-1N42TVH:/home/test2# curl https://s3.amazonaws.com/plink1-assets/plink_linux_x86_64_20220402.zip > a.zip 形式2:curl
阅读全文
摘要:1、问题: Network error: Connection refused 2、解决方法 root@DESKTOP-1N42TVH:~# /etc/init.d/ssh status * sshd is not running 3、 root@DESKTOP-1N42TVH:~# /etc/in
阅读全文
摘要:1、问题 openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory 2、查找 libssl.so.1.1 文件 [ro
阅读全文
摘要:1、测试函数 [root@rhel7pc1 test]# ls test.sh [root@rhel7pc1 test]# cat test.sh ## $1 为第一个参数, $2为第二个参数,其余以此类推 #!/bin/bash function fun_test { seq $1 } 2、加载测
阅读全文
摘要:1、创建自定义函数 格式: function name { command } [root@rhel7pc1 test]# ls test.sh [root@rhel7pc1 test]# cat test.sh ## shell中创建函数格式 #!/bin/bash function fun_te
阅读全文
摘要:1、 [root@rhel7pc1 test]# ls [root@rhel7pc1 test]# a=100 ## 生成测试变量 [root@rhel7pc1 test]# echo $a 100 [root@rhel7pc1 test]# echo $SHELL ## 系统环境变量 /bin/b
阅读全文

浙公网安备 33010602011771号