ip addr add 192.168.12.4/24 dev eno16777728但是每次重启会失效 如果希望每次重启会重新绑定IP,可以将:ip addr add 192.168.12.X/24 dev eth0 命令写入文件/etc/rc.local chmod +x /etc/rc.d/r ...
分类:
系统相关 时间:
2020-06-18 01:40:01
阅读次数:
84
一:第一个shell脚本 [root@localhost ~]# cat /etc/shells [root@localhost ~]# vi first.sh cd /boot/ pwd ls -lh vml* [root@localhost ~]# chmod +x first.sh [root ...
分类:
系统相关 时间:
2020-06-17 12:38:23
阅读次数:
85
记录所有用户登录系统的任何操作日志,以便有据可查。1.编辑/etc/profile文件vim/etc/profilehistoryUSER=`whoami`USER_IP=`who-uami2>/dev/null|awk‘{print$NF}‘|sed-e‘s/[()]//g‘`if["$USER_IP"=""];thenUSER_IP=`hostname`fiif[!-d/var/log/
分类:
系统相关 时间:
2020-06-17 10:43:12
阅读次数:
63
##基本概念 mkdir命令用于创建目录 常见参数为五个 -m, --mode=模式,设定目录权限<模式> (类似 chmod),而不是 rwxrwxrwx 减 umask -p, --parents 可以是一个路径名称。此时若路径中的某些目录尚不存在,加上此选项后,系统将自动建立好那些尚不存在的目 ...
分类:
系统相关 时间:
2020-06-17 09:14:29
阅读次数:
63
the 10 drwxr-xr-x the first bit: | | | | | | | - | regular file | | b | block special file | | c | character special file| |s | socket | |d | director ...
分类:
系统相关 时间:
2020-06-16 18:52:03
阅读次数:
80
1.切换到root用户下,怎么切换就不用说了吧,不会的自己百度去.2.添加sudo文件的写权限,命令是:chmod u+w /etc/sudoers3.编辑sudoers文件vi /etc/sudoers找到这行 root ALL=(ALL) ALL,在他下面添加xxx ALL=(ALL) ALL ...
分类:
其他好文 时间:
2020-06-16 18:17:50
阅读次数:
122
我的python版本是python3.7 1.cd 到文件夹目录2.在文件首行添加#!/usr/bin/env python3.添加权限 chmod 777 filename.py 4 脚本头部加两行 #!/usr/bin/python3 #-*-coding:utf-8 -*- 5 执行脚本 fi ...
分类:
编程语言 时间:
2020-06-14 11:17:33
阅读次数:
73
目录命令: ls -a 查看隐藏文件 -l 列 -ld 查看目录 -h 人性化显示大小 -i 显示文件编号 mkdir -p 递归创建 cp -r 复制目录 -p 保留文件属性复制 mount /dev/sr0 /mnt/cdrom 挂载cdrom到/mnt/cdrom 文件处理: touch xx ...
分类:
系统相关 时间:
2020-06-13 23:23:36
阅读次数:
84
Centos7.4 Mysql5.7.28 tar包解压安装 下载MySQL的linux安装包:mysql-5.7.28-linux-glibc2.12-x86_64.tar.gz 利用xftp将mysql5.7的linux版本的压缩包上传到linux,上传路径:/usr/data/sftp/mys ...
分类:
数据库 时间:
2020-06-13 17:29:58
阅读次数:
103