- 博客(3)
- 收藏
- 关注
原创 切换用户时用户名丢失,出现.-bash-4.2$
问题描述: 一天在登录的服务器的时候切换用户的时候发现,额,用户名怎么飞了,脚本也执行不了,用户变成了.-bash4.2-$. 原因分析: 经过排查后应该是误删除了。当前用户的环境变量下缺少了下面这两个文件 .bash_profile .bashrc 解决方案: 使用以下的两条命令从/etc/skel/文件下重新拷贝一份配置信息到`丢失用户名`的家录下,然后退出到root用户,然后切换回来就可以了 cp /etc/skel/.bashrc /home/user/ cp /etc/ske
2021-03-02 15:41:52
232
转载 centos7.0更改系统时间
CentOS7的时间分为系统时间和硬件时间。二者都修改,重启系统(init 6 )才会永久生效。 修改步骤如下 [root@localhost]: date #查看当前系统时间 [root@localhost]: date -s "2021-03-02 19:10:30 #修改当前系统时间 [root@localhost]: hwclock --show #查看硬件时间 [root@localhost]: hwclock --set --date "2021-03-02 19:10:30" #
2021-03-02 14:17:37
757
原创 Centos7.0关闭防火墙
#Centos7.0关闭防火墙 查看防火墙状态 firewall-cmd --state 关闭防护墙 systemctl stop firewalld.service 禁止防火墙开机自启 systemctl disable firewalld.service 启动防火墙开机自启 systemctl enable firewalld.service
2021-03-02 12:26:16
84
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人