linux实用操作命令大全

(1)基本cd命令

cd /   进入根目录

cd ..      返回上一级目录 
cd ../..   返回上两级目录 

cd - 返回上次所在的目录

pwd     显示工作路径 
ls          查看目录中的文件 

ls -l 显示文件和目录的详细资料 
ls -a 显示隐藏文件 

rm -rf    /svn   删除文件夹及下面所有文件(eg:根目录下svn文件夹)

(2)Linux关机和重启

命令:shutdown, reboot,  powerof,fhalt

①shutdown

shutdown -h:停止系统服务并关机

shutdown -r:停止系统服务后重启

  • shutdown -h now  --立即关机  
  • shutdown -h 10:53  --到10:53关机,如果该时间小于当前时间,则到隔天  
  • shutdown -h +10  --10分钟后自动关机  
  • shutdown -r now  --立即重启  
  • shutdown -r +30 'The System Will Reboot in 30 Mins'   --30分钟后重启并并发送通知给其它在线用户  

②reboot

reboot表示立即重启,效果等同于shutdown -r now

③poweroff

poweroff表示立即关机,效果等同于shutdown -h now,在多用户模式下(Run Level 3)不建议使用。

④halt

不理会目前系统状况下,进行硬件关机,一般不建议使用

猜你喜欢

转载自blog.csdn.net/sz80443374/article/details/82978148