An open API service indexing awesome lists of open source software.

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.

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)
```