文章分类 -  Linux常用

Linux常用命令
摘要:#命令行 示例: nohup java -jar xxx.jar & 这样执行后,nohup会把执行结果中的日志输出到当前文件夹下面的nohup.out文件中,通常情况下我们使用以上命令即可。 我们也可以手动指定一个参数来规定日志文件的输出地点,如: nohup java -jar xxx.jar 阅读全文
posted @ 2022-12-06 10:23 csj425 阅读(783) 评论(0) 推荐(0)
摘要:加入 zerotier 在线安装 curl -s https://install.zerotier.com | sudo bash #状态 zerotier-cli status #启动 sudo systemctl start zerotier-one.service #重启 sudo syste 阅读全文
posted @ 2022-11-23 13:36 csj425 阅读(851) 评论(0) 推荐(0)
摘要:查看配置 #查看系统版本 rpm -q centos-release #磁盘分区和使用情况,大分区会被分在/home目录下,装软件的时候要注意装在/home目录下 df -h #查看cpu信息 cat /proc/cpuinfo | grep name #内存情况 cat /proc/meminfo 阅读全文
posted @ 2022-11-22 17:11 csj425 阅读(30) 评论(0) 推荐(0)
摘要:#防止SSH暴力登录攻击 修改SSH端口,禁止root登陆 配置文件编辑:etc/ssh/sshd_config Port 4484 #一个别人猜不到的端口号 PermitRootLogin no $ sudo service sshd restart 安装Fail2ban sudo apt upd 阅读全文
posted @ 2022-07-12 13:59 csj425 阅读(53) 评论(0) 推荐(0)
摘要:#ubuntu 更换国内源 ubuntu 查看版本号: ``` `lsb_release -a` ``` ubuntu 查看源 ``` vim /etc/apt/sources.list ``` 一键更换 ``` bash <(curl -sSL https://gitee.com/SuperMan 阅读全文
posted @ 2022-06-02 15:59 csj425 阅读(47) 评论(0) 推荐(0)
摘要:1 服务端 直接部署:https://www.cnblogs.com/wukongroot/p/14921990.html docker部署 frps docker docker run --network host -d -v /etc/frp/frps.ini:/etc/frp/frps.ini 阅读全文
posted @ 2022-05-06 14:49 csj425 阅读(107) 评论(0) 推荐(0)
摘要:#查看本机信息 查看Linux版本,区分centos还是ubuntu radhat或centos存在: /etc/redhat-release 这个文件【 命令 cat /etc/redhat-release 】 ubuntu存在 : /etc/lsb-release 这个文件 【命令 cat et 阅读全文
posted @ 2022-05-06 10:28 csj425 阅读(49) 评论(0) 推荐(0)
摘要:查看日志常用命令 tail: -n 是显示行号;相当于nl命令;例子如下: tail -100f test.log 实时监控100行日志 tail -n 10 test.log 查询日志尾部最后10行的日志; tail -n +10 test.log 查询10行之后的所有日志; head: 跟tai 阅读全文
posted @ 2022-05-06 10:26 csj425 阅读(89) 评论(0) 推荐(0)