随笔分类 -  Linux

摘要:ssh登录linux服务器的时候,经常会有提示 There were * failed login attempts since the last successful login. 说明有大量的非法登录尝试,有几种应对方法 1 换一个sshd端口 不过也经常会被扫到 2 禁止root账号直接ssh 阅读全文
posted @ 2021-09-12 12:35 匠人先生 阅读(427) 评论(0) 推荐(0) 编辑
摘要:简介 Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems. 官网:http://s 阅读全文
posted @ 2021-08-30 15:33 匠人先生 阅读(173) 评论(0) 推荐(0) 编辑
摘要:vpn客户端配置文件 client.ovpn ca.crt ta.key 其中client.ovpn中会引用ca.crt和ta.key,并且配置服务器地址 Mac Tunnelblick https://tunnelblick.en.softonic.com/mac Windows Openvpn 阅读全文
posted @ 2021-05-21 07:22 匠人先生 阅读(2) 评论(0) 推荐(0) 编辑
摘要:linux系统运行一段时间之后蓝牙设备失灵,但是系统中还是显示连接状态,这时需要将蓝牙关闭再打开然后重新连接设备恢复, 要彻底解决需要修改grub # vim /etc/default/grub GRUB_CMDLINE_LINUX="usbcore.autosuspend=-1 " 修改之后更新 阅读全文
posted @ 2020-12-13 13:40 匠人先生 阅读(1960) 评论(0) 推荐(0) 编辑
摘要:u盘或移动硬盘插入usb之后,通过 fdisk -l 可以找到分区,比如 /dev/sdc1,然后挂载 mount /dev/sdc1 /usb 如果有报错,可能是不同的文件系统问题,如下: 1 ntfs文件系统 yum install ntfs-3g mount -t ntfs-3g /dev/s 阅读全文
posted @ 2020-12-05 01:10 匠人先生 阅读(698) 评论(0) 推荐(0) 编辑
摘要:centos启动进入emergency mode,登录root帐号之后可以通过 journalctl -xb 来查看日志,里边会有具体的错误信息,常见的错误有两种: 1)如果你重启前改动过 /etc/fstab,有可能是配置有问题,重新检查该文件,然后再 reboot 重启,问题解决; 2)如果你重 阅读全文
posted @ 2020-12-04 20:22 匠人先生 阅读(1042) 评论(0) 推荐(0) 编辑
摘要:安装arch virtualbox/vagrant 都可以 更新源 pacman -Syy pacman -Syu 安装yaourt vim /etc/pacman.conf [archlinuxcn] Server=https://mirrors.ustc.edu.cn/archlinuxcn/$ 阅读全文
posted @ 2020-07-27 00:00 匠人先生 阅读(1477) 评论(0) 推荐(0) 编辑
摘要:官网:https://www.gnu.org/software/emacs/ An extensible, customizable, free/libre text editor — and more. 一 安装 # yum install emacs # apt-get install emac 阅读全文
posted @ 2020-06-25 01:23 匠人先生 阅读(253) 评论(0) 推荐(0) 编辑
摘要:一 安装zsh # apt-get install zsh (ubuntu)# yum install zsh (redhat & centos)# zypper in zsh (opensuse)# mac自带 二 安装 oh my zsh $ sh -c "$(curl -fsSL https: 阅读全文
posted @ 2020-06-18 10:45 匠人先生 阅读(633) 评论(0) 推荐(0) 编辑
摘要:mesos slave启动失败,查看状态如下: # systemctl status mesos-slave ● mesos-slave.service - Mesos Slave Loaded: loaded (/usr/lib/systemd/system/mesos-slave.service 阅读全文
posted @ 2020-01-10 22:56 匠人先生 阅读(979) 评论(0) 推荐(0) 编辑
摘要:官方:http://www.linux-kvm.org 一 KVM简介 KVM (for Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virt 阅读全文
posted @ 2019-12-26 22:18 匠人先生 阅读(895) 评论(0) 推荐(0) 编辑
摘要:控制台操作磁盘扩容后 1 安装 # yum install cloud-utils-growpart# yum install xfsprogs 2 查看所有磁盘 # fdisk -l 3 查看分区大小 # df -h 4 磁盘扩容 # growpart /dev/vda 1 格式:growpart 阅读全文
posted @ 2019-12-15 00:55 匠人先生 阅读(406) 评论(0) 推荐(0) 编辑
摘要:# top top - 21:21:51 up 207 days, 1:30, 5 users, load average: 0.90, 0.79, 1.62 Tasks: 249 total, 1 running, 246 sleeping, 2 stopped, 0 zombie %Cpu(s) 阅读全文
posted @ 2019-11-11 21:37 匠人先生 阅读(1107) 评论(0) 推荐(0) 编辑
摘要:一 创建秘钥 1 Macbook $ ssh-keygen -t rsaGenerating public/private rsa key pair.Enter file in which to save the key ($HOME/.ssh/id_rsa): Enter passphrase ( 阅读全文
posted @ 2019-10-03 22:08 匠人先生 阅读(959) 评论(0) 推荐(0) 编辑
摘要:logrotate logrotate ‐ rotates, compresses, and mails system logs logrotate is designed to ease administration of systems that generate large numbers o 阅读全文
posted @ 2019-06-18 22:01 匠人先生 阅读(513) 评论(0) 推荐(0) 编辑
摘要:linux换行为\n,windows换行为\r\n,windows环境编辑的shell脚本在linux下执行会报错: line 2: $'\r': command not found 查看 # cat -A test.sh #!/bin/sh^M$^M$... 解决方法: vi 1)替换 :%s/^ 阅读全文
posted @ 2019-05-30 15:50 匠人先生 阅读(2641) 评论(0) 推荐(0) 编辑
摘要:启动进程后查看日志(stdout和stderr) 1 nohup+tail # nohup $cmd > /path/to/file 2>&1 & # tail -f /path/to/file append # nohup $cmd >> /path/to/file 2>&1 & 2 tee # 阅读全文
posted @ 2019-05-20 20:01 匠人先生 阅读(1153) 评论(0) 推荐(0) 编辑
摘要:一 vi配置文件 ~/.vimrcor/etc/vimrc ps:如果使用的是idea中的vim插件,使用的配置文件为 ~/.ideavimrc~~~`s 配置文件中可以修改配色,可以修改键位绑定,可以修改配置,比如 inoremap <C-a> <Home> inoremap <C-e> <End 阅读全文
posted @ 2019-04-02 17:04 匠人先生 阅读(573) 评论(0) 推荐(0) 编辑
摘要:gz文件不需要解压即可进行相关操作 $ zcat test.log.gz $ zmore test.log.gz $ zless test.log.gz $ zgrep '1.2.3.4' test.log.gz $ egrep 'regex' test.log.gz 阅读全文
posted @ 2019-03-19 16:20 匠人先生 阅读(1037) 评论(0) 推荐(0) 编辑
摘要:有时服务器环境受限,比如在内网环境不能暴露端口从外网访问,用curl看html代码比较累,这时可以使用命令行浏览器来查看相关页面 links 官方:http://links.twibright.com/ Links is an open source text and graphic web bro 阅读全文
posted @ 2019-03-14 15:09 匠人先生 阅读(7300) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示