Move pages back into a "pages" folder

This commit is contained in:
rprieto
2014-03-04 23:28:29 +11:00
parent 0a4c0f0a37
commit f00bf64426
99 changed files with 0 additions and 0 deletions

24
pages/linux/apt-get.md Normal file
View File

@@ -0,0 +1,24 @@
# apt-get
> Debian and Ubuntu package management utility
- Synchronize list of packages and versions available. This should be run first, before running subsequent apt-get commands.
`apt-get update`
- install a new package
`apt-get install {{package}}`
- remove a package
`apt-get remove {{package}}`
- Upgrade installed packages to newest available versions
`apt-get upgrade`
- Upgrade installed packages (like `apt-get upgrade`) including removing obsolete packages and installing additional packages to meet new package dependencies.
`apt-get dist-upgrade`

19
pages/linux/du.md Normal file
View File

@@ -0,0 +1,19 @@
# du
> Estimate file space usage
- get a sum of the total size of a file/folder in human readable units
`du -sh {{file/directory}}`
- list file sizes of a directory and any subdirectories in KB
`du -k {{file/directory}}`
- get recursively, individual file/folder sizes in human readable form
`du -ah {{directory}}`
- list the KB sizes of directories for N levels below the specified directory
`du --max-depth=1`

31
pages/linux/emerge.md Normal file
View File

@@ -0,0 +1,31 @@
# emerge
> Gentoo Linux package manager utility
- synchronize all packages
`emerge --sync`
- update all packages, including dependencies
`emerge -uDNav @world`
- resume a failed updated, skipping the failing package
`emerge --resume --skipfirst`
- install a new package, with confirmation
`emerge -av {{package-name}}`
- remove a package, with confirmation
`emerge -Cav {{package-name}}`
- remove orphaned packages (that were installed only as dependencies)
`emerge -avc`
- search the package database for a keyword
`emerge -S {{keyword}}`

23
pages/linux/findmnt.md Normal file
View File

@@ -0,0 +1,23 @@
# findmnt
> Find your filesystem
- List all mounted filesystems
`findmnt`
- Search for a device
`findmnt {{/dev/sdb1}}`
- Search for a mountpoint
`findmnt {{/}}`
- Find filesystems in specific type
`findmnt -t {{ext4}}`
- Find filesystems with specific label
`findmnt LABEL={{BigStorage}}`

23
pages/linux/ip.md Normal file
View File

@@ -0,0 +1,23 @@
# ip
> Show / manipulate routing, devices, policy routing and tunnels
- List interfaces with detailed info
`ip a`
- Display the routing table
`ip r`
- Make an interface up/down
`ip link set {{interface}} up/down`
- Add/Delete an ip address to an interface
`ip addr add/del {{ip}}/{{mask}} dev {{interface}}`
- Add an default route
`ip route add default via {{ip}} dev {{interface}}`

27
pages/linux/journalctl.md Normal file
View File

@@ -0,0 +1,27 @@
# journalctl
> Query the systemd journal
- Show all messages from this boot
`journalctl -b`
- Show all messages from last boot
`journalctl -b -1`
- Follow new messages (like `tail -f` for traditional syslog)
`journalctl -f`
- Show all messages by a specific unit
`journalctl -u {{unit}}`
- Show all messages by a specific process
`journalctl _PID={{pid}}`
- Show all messages by a specific executable
`journalctl {{/path/to/executable}}`

13
pages/linux/md5sum.md Normal file
View File

@@ -0,0 +1,13 @@
# md5sum
> Calculate MD5 cryptographic checksums
- Calculate the MD5 checksum for file(s) or files in a directory, one checksum per file
`md5sum {{filename1}}`
`md5sum {{filename1}} {{filename2}}`
`md5sum {{directory/\*}}`
- Read a file of MD5SUMs and verify all files have matching checksums
`md5sum -c {{filename.md5}}`

23
pages/linux/pacman.md Normal file
View File

@@ -0,0 +1,23 @@
# pacman
> Arch Linux package manager utility
- synchronize and update all packages
`pacman -Syyu`
- install a new package
`pacman -S package-name`
- remove a package and its dependencies
`pacman -Rs package-name`
- search the package database for a keyword
`pacman -Ss icon theme`
- list installed packages and versions
`pacman -Q`

19
pages/linux/shutdown.md Normal file
View File

@@ -0,0 +1,19 @@
# shutdown
> Shutdown and reboot the system
- Power off (halt) immediately
`shutdown -h now`
- Reboot immediately
`shutdown -r now`
- Reboot in 5 minutes
`shutdown -r +{{5}} &`
- Cancel a pending shutdown/reboot operation
`shutdown -c`

27
pages/linux/ss.md Normal file
View File

@@ -0,0 +1,27 @@
# ss
> Utility to investigate sockets
- Dump all TCP/UDP/RAW/UNIX sockets
`ss -a {{-t/-u/-w/-x}}`
- Show process(es) that using socket
`ss -p`
- Filter TCP sockets by states, only/exclude
`ss {{state/exclude}} {{bucket/big/connected/synchronized/...}}`
- Filter sockets by address and/or port
`ss -t dst 1.2.3.4:80`
`ss -u src 127/8`
`ss -t 'dport >= :1024'`
`ss -x "src /tmp/.X11-unix/*"`
`ss -t state established '( dport = :ssh or sport = :ssh )'`
- Only list IPv4 or IPv6 sockets
`ss {{-4/-6}}`

23
pages/linux/systemctl.md Normal file
View File

@@ -0,0 +1,23 @@
# systemctl
> Control the systemd system and service manager
- List failed units
`systemctl --failed`
- Start/Stop/Restart a service
`systemctl start/stop/restart {{unit}}`
- Show the status of a unit
`systemctl status {{unit}}`
- Enable/Disable a unit to be started on bootup
`systemctl enable/disable {{unit}}`
- Reload systemd, scanning for new or changed units
`systemctl daemon-reload`