Linux DevOps - yszheda/wiki GitHub Wiki
$ lscpu
# Hardware
$ lsblk --nodeps -o name,model
# Memory
$ sudo dmidecode -t memory | grep 'Size\|Speed\|Part Number'
# Motherboard
$ sudo dmidecode -t System Information | grep 'Manufacturer\|Product Name'
lscpu | egrep '^Thread|^Core|^Socket|^CPU\('
nproc --all
# Get the CPU
grep 'physical id' /proc/cpuinfo | sort -u
# Get the core
grep 'core id' /proc/cpuinfo | sort -u | wc -l
# Get the threads
grep 'processor' /proc/cpuinfo | sort -u | wc -l
# Get the cpu version
dmidecode -s processor-version
getconf PAGESIZE
getconf PAGE_SIZE
echo username:new_password | chpasswd
- How to automatically add user account AND password with a Bash script?
- https://www.cyberciti.biz/faq/how-to-use-chmod-and-chown-command/
- https://wiki.archlinux.org/index.php/Users_and_groups
$ su terdon - ## start a new login shell
- Linux命令-2:强大的pkexec
- How do I run GUI applications as root by using pkexec?
- How to configure pkexec?
- https://www.freedesktop.org/software/polkit/docs/0.105/pkexec.1.html
$ dmesg -wH
- How To View and Configure Linux Logs on Ubuntu and Centos
- https://help.ubuntu.com/community/LinuxLogFiles
lnav
:Linux 下一个基于控制台的高级日志文件查看器
uncompress *.Z
tar -xvf *.tar
%CPU -- CPU Usage : The percentage of your CPU that is being used by the process. By default, top displays this as a percentage of a single CPU. On multi-core systems, you can have percentages that are greater than 100%. For example, if 3 cores are at 60% use, top will show a CPU use of 180%. See here for more information. You can toggle this behavior by hitting Shifti while top is running to show the overall percentage of available CPUs in use.
dstat -C 0,1,2,3,total
- probing EDD boot message stays for ten minutes on centos 6.6
- LiveUSB stuck after “Probing EDD” during boot
- Why does installation halt at the "Probing EDD" message on the Fujitsu PRIMERGY TX120 S2?
- Altering the default boot option on CentOS
- How do I disable X at boot time so that the system boots in text mode?
~/.profile
:
export SHELL=/bin/bash
exec /bin/bash
$ file --mime-encoding filename
$ iconv -f old_encoding -t new_encoding filename
- How do I grep a file in a smb mount point without using mount or fstab?
- Where can I find the mount point for SMB shares in 13.04?
/run/user/<username>/gvfs
$ sudo dpkg --remove unity-scope-gdrive
$ sudo dpkg --remove account-plugin-google
$ sudo apt-get -f install
Restore ~/.local/share/autojump/autojump.txt.bak
:
invalid literal for float() #463