llinux重启、用户切换、注销命令
2024-10-08 02:27:22
一.指令
shutdown命令
shutdown -h now //立即关机
shutdown -h 2 //分钟后关机
shutdown -r now //立即重启
shutdown -r 1 //1分钟后重启
sleep 30s //等待30秒来后面也可以运行程序
halt //关机
reboot //重启
sync //把内存的数据同步到磁盘,一般定时关机或者重启都要加这个指令放置信息丢失
init 0 //关机
init 6 //重启
二.定时关机脚本
a.txt
sync
sleep 20s
reboot
授权文件
chmod 777 文件名
运行文件
./文件名` 注意这里`/`与`文件名`之间不要加`空格
最新文章
- mongodb 数据库操作--备份 还原 导出 导入
- iOS设计模式简介
- Spring的DI(Ioc) - 注入集合类型
- Excel 代码
- [转]C#中的?和??
- easy_painting
- memcached采用的网络模型
- Retrofit,Okhttp对每个Request统一动态添加header和参数(五)
- 80后程序员降薪6K,预感中年危机来袭,准备跳槽却碰壁
- 从后台拿到echarts的数据值,求出百分比
- socket架构
- JAVA Number与Math类
- HDU 1064(求平均数 **)
- git pull/fectch
- idea中切换svn地址不起作用
- 【基础】iframe之间的切换(四)
- Spring容器中获取bean实例的方法
- cisco 3850 GBIC报错处理
- 001.Chrony时间服务器
- printf()详解之终极无惑
热门文章
- uva 10566 Crossed Ladders (二分)
- Getting started with the basics of programming exercises_5
- mongodb Helper
- get_magic_quotes_gpc() PHP转义的真正含义
- Oracle的dual是什么东西啊
- .net Framework 源代码 · ScrollViewer
- Appium + python 自动化测试环境配置
- Python--day24--复习
- JPA 一对多、多对一注解
- laravel post提交数据时显示异常