https://github.com/gamemann/useful-linux-commands
Just a repository I'm using to store useful Linux commands to me and possibly others.
https://github.com/gamemann/useful-linux-commands
cheatsheet commands linux sheet useful
Last synced: 7 months ago
JSON representation
Just a repository I'm using to store useful Linux commands to me and possibly others.
- Host: GitHub
- URL: https://github.com/gamemann/useful-linux-commands
- Owner: gamemann
- Created: 2023-04-18T20:21:24.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-26T04:40:04.000Z (over 2 years ago)
- Last Synced: 2025-03-16T23:51:20.702Z (7 months ago)
- Topics: cheatsheet, commands, linux, sheet, useful
- Homepage:
- Size: 4.88 KB
- Stars: 26
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Useful Linux Commands
This repository stores Linux commands I find very useful in my case. This may help others as well.## Kill Process By Port Number
This command kills a process bound to a specified port (``). It is recommended to run this command as root via `sudo`.```bash
PORT=
kill $(sudo lsof -t -i:$PORT)
```## Current CPU Clock Speed
This command outputs the current clock speed of each CPU in MHz and updates the output every second.```bash
watch -n 1 'cat /proc/cpuinfo | grep "MHz"'
```## Kill All Processes Matching Process Name
This command kills all processes that matches a process name.```bash
NAME=""
kill -9 $(pgrep -f $NAME)
```