Linux shutdown & reboot & poweroff All In One
Linux shutdown & reboot & poweroff All In One
Raspberry Pi
# shutdown
# -h, --halt
$ sudo shutdown -h now
$ sudo shutdown now
$ sudo reboot
$ sudo poweroff
man shutdown
$ man shutdown > man-shutdown.md
$ cat man-shutdown.md
demos
# SSH
$ ssh pi@raspberrypi.local
(🐞 反爬虫测试!打击盗版⚠️)如果你看到这个信息, 说明这是一篇剽窃的文章,请访问 https://www.cnblogs.com/xgqfrms/ 查看原创文章!
Apache
https://www.cyberciti.biz/faq/star-stop-restart-apache2-webserver/
macOS
Intel CPU
s
Intel(R) Core(TM)
i7-8750H
CPU @ 2.20GHz
$ node ./os-module.mjs
os.arch() = x64
os.cpus().length = 12
os.cpus()[0] = {
model: 'Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz',
speed: 2200,
times: { user: 3276490, nice: 0, sys: 2014940, idle: 30180650, irq: 0 }
}
os.hostname() = xgqfrms-mbp.local
os.platform() = darwin
os.userInfo() = {
uid: 501,
gid: 20,
username: 'xgqfrms-mbp',
homedir: '/Users/xgqfrms-mbp',
shell: '/bin/zsh'
}
os.version() = Darwin Kernel Version 21.4.0: Mon Feb 21 20:34:37 PST 2022; root:xnu-8020.101.4~2/RELEASE_X86_64
os.arch() = arm64
os.cpus().length = 4
os.cpus()[0] = {
model: 'Cortex-A53',
speed: 1200,
times: { user: 8540, nice: 0, sys: 9780, idle: 1002810, irq: 0 }
}
os.hostname() = raspberrypi
os.platform() = linux
os.userInfo() = {
uid: 1000,
gid: 1000,
username: 'pi',
homedir: '/home/pi',
shell: '/bin/bash'
}
os.version() = #1613 SMP PREEMPT Thu Jan 5 12:03:08 GMT 2023
.mjs
// write your code here
import os from 'node:os'
// const os = require('node:os');
// console.log(`os =`, os)
// console.log(`os.arch =`, os.arch)
/* os.arch = [Function: arch] {
[Symbol(Symbol.toPrimitive)]: [Function (anonymous)]
} */
console.log(`os.arch() =`, os.arch())
// console.log(`os.cpus() =`, os.cpus())
console.log(`os.cpus().length =`, os.cpus().length)
console.log(`os.cpus()[0] =`, os.cpus()[0])
console.log(`os.hostname() =`, os.hostname())
console.log(`os.platform() =`, os.platform())
console.log(`os.userInfo() =`, os.userInfo())
console.log(`os.version() =`, os.version())
// console.log(`os =`, os)
https://www.cnblogs.com/xgqfrms/p/17400616.html
refs
https://www.cnblogs.com/xgqfrms/p/17396558.html
©xgqfrms 2012-2021
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/17434878.html
未经授权禁止转载,违者必究!