windows@启用休眠@关闭休眠@删除休眠文件@查看休眠文件@命令行休眠powercfg

news/2025/2/20 10:11:17/

文章目录

    • ref
    • 设置前提:
      • 驱动要求
    • GUI@控制面板方式启用
      • powercfg.cpl
      • 允许更改不可用按钮:
      • the result
    • CLI@powercfg.exe命令行操作
      • 基本语法和帮助
      • 关于休眠的子命令
      • 启用休眠😊
      • hiberfil.sys系统休眠文件
      • 使计算机休眠😊
        • shutdown相关用法
      • 关闭休眠功能😊@删除休眠文件
      • 其他相关子命令
      • 调整休眠文件大小

ref

  • Shut down, sleep, or hibernate your PC - Microsoft Support
  • win10删除休眠文件的方法是什么_windows10休眠文件怎么删除-系统城 (xitongcheng.com)

设置前提:

驱动要求

  • 您的计算机已经安装了必要的驱动
    • 最好确保显卡在内的所有驱动都是正常的
    • 否则可能找不到或者无法顺利启用休眠功能
  • 在这里插入图片描述

GUI@控制面板方式启用

powercfg.cpl

  • 您可以用命令行或者win+R输入powercfg.cpl来快速跳转到相应的设置页面

    • PS C:\Users\cxxu> powercfg.cpl
      

允许更改不可用按钮:

  • 在这里插入图片描述

  • 在这里插入图片描述

the result

  • 在这里插入图片描述

CLI@powercfg.exe命令行操作

  • PS C:\Users\cxxu> powercfg.exe -?
    

基本语法和帮助

  • POWERCFG /COMMAND [ARGUMENTS]Description:Enables users to control power settings on a local system.For detailed command and option information, run "POWERCFG /? <COMMAND>"
    

关于休眠的子命令

  • POWERCFG /HIBERNATE <ON|OFF>POWERCFG /HIBERNATE /SIZE <PERCENT_SIZE>POWERCFG /HIBERNATE /TYPE <REDUCED|FULL>Alias:POWERCFG /HDescription:Enables/disables the hibernate feature or sets the hiberfile size.Parameter List:<ON|OFF>                Enables/disables the hibernate feature./SIZE <PERCENT_SIZE>    Specifies the desired hiberfile size as a percentageof the total memory size. The default size cannot besmaller than 40. This parameter will also causehibernate to be enabled./TYPE <REDUCED|FULL>    Specifies the desired hiberfile type. A reducedhiberfile only supports hiberboot.Examples:POWERCFG /HIBERNATE OFFPOWERCFG /HIBERNATE /SIZE 100POWERCFG /HIBERNATE /TYPE REDUCED

启用休眠😊

  • 使用命令行powercfg -h on系统将尝试启用休眠功能
    • 如果您的软硬件都支持,一般情况下是可以正常启用
    • 个别情况(比如驱动问题,可能会执行失败,那么您可能需要修复一下驱动问题)

hiberfil.sys系统休眠文件

  • 当您执行休眠操作后,系统将在C:\目录生成一个隐藏系统文件hiberfil.sys

使计算机休眠😊

  • 比如使用命令行shutdown -h

shutdown相关用法

  • shutdown.exe -?

  • shutdown | Microsoft Learn

  • 🚀  shutdown.exe -?
    Usage: C:\WINDOWS\system32\shutdown.exe [/i | /l | /s | /sg | /r | /g | /a | /p | /h | /e | /o] [/hybrid] [/soft] [/fw] [/f][/m \\computer][/t xxx][/d [p|u:]xx:yy [/c "comment"]]No args    Display help. This is the same as typing /?./?         Display help. This is the same as not typing any options./i         Display the graphical user interface (GUI).This must be the first option./l         Log off. This cannot be used with /m or /d options./s         Shutdown the computer./sg        Shutdown the computer. On the next boot, if Automatic Restart Sign-Onis enabled, automatically sign in and lock last interactive user.After sign in, restart any registered applications./r         Full shutdown and restart the computer./g         Full shutdown and restart the computer. After the system is rebooted,if Automatic Restart Sign-On is enabled, automatically sign in andlock last interactive user.After sign in, restart any registered applications./a         Abort a system shutdown.This can only be used during the time-out period.Combine with /fw to clear any pending boots to firmware./p         Turn off the local computer with no time-out or warning.Can be used with /d and /f options./h         Hibernate the local computer.Can be used with the /f option./hybrid    Performs a shutdown of the computer and prepares it for fast startup.Must be used with /s option.节约篇幅........
    

关闭休眠功能😊@删除休眠文件

  • powercfg -h off

    • 该命令删除应为启用休眠功能所产生的hiberfil.sys

      • 该文件是系统文件,默认是隐藏文件

      • 如果需要查看,可以用资源管理器勾选显示隐藏文件

      • 或者使用powershell,输入以下命令查看

        • ls C:\ -Force|where{$_.FullName -like '*sys'}

        • 	
          PS C:\Users\cxxu> ls C:\ -Force|where{$_.FullName -like '*sys'}Directory: C:\Mode                 LastWriteTime         Length Name
          ----                 -------------         ------ ----
          -a-hs          12/22/2022  5:13 PM     3371900928 hiberfil.sys
          -a-hs          12/22/2022  6:20 PM     5475780608 pagefile.sys
          -a-hs          12/21/2022 11:08 AM       16777216 swapfile.sys
          

其他相关子命令

  • Command List:/LIST, /L          Lists all power schemes./QUERY, /Q         Displays the contents of a power scheme./CHANGE, /X        Modifies a setting value in the current power scheme./CHANGENAME        Modifies the name and description of a power scheme./DUPLICATESCHEME   Duplicates a power scheme./DELETE, /D        Deletes a power scheme./DELETESETTING     Deletes a power setting./SETACTIVE, /S     Makes a power scheme active on the system./GETACTIVESCHEME   Retrieves the currently active power scheme./SETACVALUEINDEX   Sets the value associated with a power settingwhile the system is powered by AC power./SETDCVALUEINDEX   Sets the value associated with a power settingwhile the system is powered by DC power./IMPORT            Imports all power settings from a file./EXPORT            Exports a power scheme to a file./ALIASES           Displays all aliases and their corresponding GUIDs./GETSECURITYDESCRIPTORGets a security descriptor associated with a specifiedpower setting, power scheme, or action./SETSECURITYDESCRIPTORSets a security descriptor associated with apower setting, power scheme, or action./HIBERNATE, /H     Enables and disables the hibernate feature./AVAILABLESLEEPSTATES, /AReports the sleep states available on the system./DEVICEQUERY       Returns a list of devices that meet specified criteria./DEVICEENABLEWAKE  Enables a device to wake the system from a sleep state./DEVICEDISABLEWAKE Disables a device from waking the system from a sleepstate.....
    省略篇幅
    ..
    

    调整休眠文件大小

    • Hibernation file too big? Reduce size of hiberfil.sys in Windows 11/10 (thewindowsclub.com)

    • 例如:将休眠文件压缩到物理内存的50%(写入磁盘保存)

      • powercfg.exe /hibernate /size 50
        
      • 如果压缩的百分比设置的过于低(比如低于40个百分点,可能导致休眠失败/蓝屏)


http://www.ppmy.cn/news/392173.html

相关文章

关于清理C盘的休眠文件

关于清理C盘的休眠文件 C盘有一个很大的hiberfil.sys的文件占用了6GB甚至是16G。hiberfil.sys文件是 win10 休眠功能&#xff08;Hibernation&#xff09;中将内存数据与会话数据保存到电脑硬盘、以便于win10计算机断电重新启动后可以快速恢复会话所需的内存镜像文件。休眠和睡…

关闭计算机休眠文件,如何对Windows系统休眠文件瘦身并释放C盘?

在Windows系统中&#xff0c;大家都知道有一个休眠功能&#xff0c;这个功能很受欢迎&#xff0c;因为它可以让计算机关闭电源进入到休眠模式&#xff0c;同时还能保存当前内存中的所有数据&#xff0c;再次开机能够迅速恢复到关机前的状态&#xff0c;这个功能在固态硬盘普及之…

计算机休眠文件可以删除吗,win10休眠文件有必要删除吗_删除休眠文件的方法-win7之家...

最近有win10小伙伴发现C盘内存不太够了就翻阅起了C盘文件&#xff0c;在无意中发现了hiberfil.sys文件所占内存特别高&#xff0c;一搜索发现是休眠文件。因此就想问问小编休眠文件有必要删除吗?其实删除休眠文件的影响并不大&#xff0c;小伙伴只需要关闭休眠功能就能自动删除…

系统休眠文件可以删除吗 系统休眠文件怎么删除

昨天小编在清理windows系统时&#xff0c;发现系统休眠文件占用了大量的磁盘空间&#xff0c;不过第一时间不敢清除&#xff0c;怕对系统产生影响&#xff0c;后来查阅资料才发现系统休眠文件是可以删除的&#xff0c;并不会对系统有什么负担&#xff0c;具体的原因小编已经放在…

FPS游戏

FPS 求助编辑百科名片 FPS FPS是第一人称射击类游戏的简称&#xff08;游戏专有名词&#xff09;。 FPS&#xff08;First-Person Shooter Game&#xff09;&#xff1a;第一人称射击游戏 严格来说FPS属于ACT类游戏的一个分支&#xff0c;但和RTS类游戏一样&#xff0c;由于其在…

6月17日吃鸡服务器维护,英雄联盟6月17日更新了什么

1 回答 碧蓝航线6月10日更新了什么 碧蓝航线6月10号更新内容详解? 碧蓝航线在游戏上线后不久&#xff0c;迎来了一次较大的更新&#xff0c;那么这次6月10日的更新,具体更新了哪些内容呢?别着急,接下来就和小编一起来看下碧蓝航线6月10日更新内容详解! 2019-11-09 1 回答 碧蓝…

网抑云音乐.ncm加密格式转换mp3

网易云音乐下载的大部分版权音乐都是以.ncm格式进行加密的&#xff0c;无法上传至课件&#xff0c;无法在没有网易云播放器的设备上播放。 所以我们需要解码成mp3格式 直接将加密的.ncm文件拖到ncmdump软件&#xff0c;就会在根目录里生成已转换的MP3文件。 链接&#xff1a…

QQ音乐特有的.qmc3文件 转换成.mp3

QMC3是QQ音乐独有的加密方式&#xff0c;想要把QMC3格式转换成MP3格式&#xff0c;需要借助第三方软件QMC解码器。 网站&#xff1a;QMC在线解密 网页版&#xff0c;全平台支持&#xff0c;这个网站还是摩声大佬提供的&#xff01; http://moresound.tk/music/tool/