随笔分类 -  Linux基础类

摘要:chage -d `date '+%F'` 用户 阅读全文
posted @ 2024-05-13 16:22 LB_运维技术 阅读(13) 评论(0) 推荐(0) 编辑
摘要:cat /etc/shadow | awk -F ":" '{print 1,5}' | sed -e 's/ /,/g' 阅读全文
posted @ 2024-04-08 17:14 LB_运维技术 阅读(4) 评论(0) 推荐(0) 编辑
摘要:1、账号锁定 passwd -l 用户名 usermod -L 用户名 2、账号解锁 passwd -u 用户名 usermod -U 用户名 3、用户添加附属组 usermod -aG 组名 用户名 阅读全文
posted @ 2024-01-19 16:19 LB_运维技术 阅读(10) 评论(0) 推荐(0) 编辑
摘要:假设你想要安装的软件包叫做app,注意,这里的命令通常需要sudo或者root权限。 //centos系统、redhat系统 rpm-qa | grep app #查找本机是否安装了app; rpm-ivh app.rpm #假设你有app的rpm包,这样直接安装 sudo yum install 阅读全文
posted @ 2024-01-05 14:31 LB_运维技术 阅读(31) 评论(0) 推荐(0) 编辑
摘要:命令: # usermod --shell shell类型 用户名 # usermod --shell /bin/sh libin 阅读全文
posted @ 2023-12-21 18:28 LB_运维技术 阅读(84) 评论(0) 推荐(0) 编辑
摘要:(1) awk -F':' '{print $1}' /etc/passwd | tail -n3 (2) cut -d : -f 1 /etc/passwd | tail -n3 阅读全文
posted @ 2023-09-11 10:04 LB_运维技术 阅读(136) 评论(0) 推荐(0) 编辑
摘要:ps -eo user,pid,pcpu,pmem,args --sort=-pmem |head -n 10 阅读全文
posted @ 2023-09-02 07:56 LB_运维技术 阅读(56) 评论(0) 推荐(0) 编辑
摘要:空格翻页 全屏导航 ctrl + F - 向前移动一屏ctrl + B - 向后移动一屏ctrl + D - 向前移动半屏ctrl + U - 向后移动半屏 单行导航j - 向前移动一行k - 向后移动一行 其它导航G - 移动到最后一行g - 移动到第一行q / ZZ - 退出 less 命令 阅读全文
posted @ 2023-08-14 09:45 LB_运维技术 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2023-08-14 09:28 LB_运维技术 阅读(32) 评论(0) 推荐(0) 编辑
摘要:解决方案: # grep --color -i "wheel" /etc/group | awk -F: '{print $4}' 阅读全文
posted @ 2023-07-13 23:36 LB_运维技术 阅读(175) 评论(0) 推荐(0) 编辑
摘要:例如: # df -h | awk '{ print strftime("%Y.%m.%d %H:%M:%S",systime())"\t" $0; fflush() }' 阅读全文
posted @ 2023-06-28 16:48 LB_运维技术 阅读(31) 评论(0) 推荐(0) 编辑
摘要:锁定用户 passwd -l 用户名 usermod -L 用户名 解锁用户 passwd -u 用户名 usermod -U 用户名 查看账户状态 passwd -S 用户名 阅读全文
posted @ 2023-06-25 09:10 LB_运维技术 阅读(73) 评论(0) 推荐(0) 编辑
摘要:例如: # ifconfig eth4:0 10.154.X.X netmask 255.255.255.224 up 阅读全文
posted @ 2023-03-31 16:12 LB_运维技术 阅读(183) 评论(0) 推荐(0) 编辑
摘要:# crontab -l# 查看现有的时间服务器* * * * * chronyc sources -v >>/tmp/time.log 2>&1# 查看时间服务器状态#* * * * * chronyc sourcestats -v >>/tmp/time.log 2>&1# 每隔2秒,使用 nt 阅读全文
posted @ 2023-03-09 17:40 LB_运维技术 阅读(68) 评论(0) 推荐(0) 编辑
摘要:linux 虚拟机本地连接与外网连接设置 版本标识 V1 编制单位 LiBin 编制日期 2022年12月7日 第一步:设置自己本地电脑网络 控制面板--网络和Internet-网络连接 鼠标右击你连接外网的网络属性--共享(我们虚拟机一般都是VMnet8)--勾选允许--确认 这时候会可能会自动给 阅读全文
posted @ 2022-12-07 20:51 LB_运维技术 阅读(978) 评论(0) 推荐(0) 编辑
摘要:查询帮助命令(3)manMan工具可以显示系统手册页中的内容。man page是用less程序来看的cat /etc/man.configMANPATH /usr/manMANPATH /usr/share/manMANPATH /usr/local/manMANPATH /usr/local/sh 阅读全文
posted @ 2022-11-23 21:31 LB_运维技术 阅读(210) 评论(0) 推荐(0) 编辑
摘要:(1)egrep -v "^$|^#" /etc/security/limits.d/20-nproc.conf (2)vim /etc/security/limits.d/20-nproc.conf (3)losf -u 用户 | wc -l 查看 单个用户可用的最大进程数量(超过会警告) 设置 阅读全文
posted @ 2022-07-28 16:41 LB_运维技术 阅读(614) 评论(0) 推荐(0) 编辑
摘要:mdadm命令 – 管理RAID磁盘阵列组 mdadm命令来自于英文词组“multiple devices admin”的缩写,其功能是用于管理RAID磁盘阵列组。作为Linux系统下软RAID设备的管理神器,mdadm命令可以进行创建、调整、监控、删除等全套管理操作。 -D 显示RAID设备的详细 阅读全文
posted @ 2022-07-28 16:37 LB_运维技术 阅读(335) 评论(0) 推荐(0) 编辑
摘要:不要直接删除该文件,而是通过将文件 truncate 的方式,释放磁盘空间。 [root@libin3 ~]# find /proc/*/fd -ls | grep '(deleted)'(1)cat /dev/null > filename2:>{filename} 阅读全文
posted @ 2022-07-28 16:10 LB_运维技术 阅读(752) 评论(0) 推荐(0) 编辑
摘要:root@jernymy-desktop:~cdroot@jernymydesktop: / ln -s /mnt/hgfs/ 阅读全文
posted @ 2022-07-28 16:09 LB_运维技术 阅读(101) 评论(0) 推荐(0) 编辑

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