openSUSE:Cheat sheet 13.1
# yast –-qtRun YaST using Gtk GUI
# yast --gtkRun YaST in text-mode
# yast --ncursesList available YaST modules
# yast -lUse modules
# yast <modulename>
ZYpp Package Management
List repositories# zypper lrAdd repository
# zypper ar -f <URL> <alias>Refresh repositories
# zypper refUpdate installed packages
# zypper upPerform a distribution upgrade
# zypper dupPackage information
# zypper if <package name>Package search
# zypper se <package, pattern or dependancy name>Which package owns a file
# zypper se --provides <file path>List files in package
$ rpm -ql <package name>
Network
View network interfaces$ ip a $ iwconfigShow routes
$ ip ru; ip route show table allShow open TCP/UDP ports
# ss -anptuShow all open ports
# ss -anpTest host availability
$ ping hostnameChange host name
# hostnamectl set-hostname machine.network.name
Services
List all services# systemctl list-units --type serviceService status
# systemctl status <service name>Start/Stop/Restart service
# systemctl start <service name> # systemctl stop <service name> # systemctl restart <service name>Show overriden config files
# systemd-deltaAnaylze boot times
# systemd-analyze blame # systemd-analyze plot >filename.svgShow the journal information
# journalctl -u <service name> # journalctl -f (follow the output of the journal, similar to 'old' tail -f /var/log/messages) # journalctl -b (only show messages since last boot)Manage Time and Date
# timedatectl
CPU & Memory information
View CPU details$ lscpu $ less /proc/cpuinfo $ uname -aShow running processes
$ ps -ef $ pstree $ top -cShow memory use
$ less /proc/meminfo $ freeEnable/disable swap
$ swapon -a $ swapoff -aShow all open files & directories
# lsof | less # lsof | grep -i filename
File Systems
List disks & partitions# fdisk -l # fdisk -l /dev/<h/s>d<a/z>List mounted file systems
$ lsblk $ findmnt $ less /proc/self/mountinfoMount a partition
# mount -t <type> <device> <mount point>Mount a CD/DVD iso image
# mount -t iso9660 -o loop dvd-image.iso <mount point>Unmount file systems
# umount /dev/<device> # umount /<mount point>Inode and disk space usage combined, or output per field type
# df --o -h # df --output=target,fstype,pcentspace occupied by a file or directory
# du -hShow all directories occupying more space than 10M
# du -h -t10M
Accounts
Create user account# useradd <name>-u UID
-g GID
-d home directory
-c full user name
-s default shell
Delete user account
# userdel <name>Change user password
# passwd <name>Modify user account
# usermod <options> <name>
Build Service
Branch & Checkout a Package$ osc bco <source project> <source package>Commit changes to package
$ osc commit -m "<comment>"Submit changed package
$ osc sr
No comments:
Post a Comment