Add some Linux and .NET commands

This commit is contained in:
James Skemp 2023-08-13 18:16:42 -05:00
parent 69cb35ddd7
commit e138ab9186
4 changed files with 36 additions and 0 deletions

View File

@ -8,6 +8,7 @@
- [Linux Commands](./linux.md)
- [nginx](./nginx.md)
- [Raspberry Pi Commands](./pi.md)
- [Directories](./linux/directories.md)
- [macOS Commands](./macos.md)
- [T-SQL](./tsql.md)
- [PostgreSQL](./postgresql.md)

View File

@ -2,6 +2,7 @@
- [dotnet new](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-new)
- `dotnet new list`
- `dotnet new gitignore` adds a .gitignore to the current directory.
```powershell
# View .NET installed versions and information.

View File

@ -16,6 +16,12 @@ whoami
# View last hour of SSH logs.
sudo journalctl -u ssh --since "1 hour ago"
# Determine shell being used.
ps -p "$$"
# Find process having a process id (PID).
ps -p <pid>
```
## System management
@ -180,6 +186,12 @@ ip a
# Server uptime.
uptime
# View path variable.
echo $PATH
# Find path of binary.
which cd
```
## Package management

22
src/linux/directories.md Normal file
View File

@ -0,0 +1,22 @@
# Linux Directories
From root (`cd /`):
- `/bin` essential executables, always available
- `/sbin` essential super user executables
- `/lib` shared common libraries (for `bin` and `sbin`)
- `/etc` (editable text configuration)
- `/usr`
- `/usr/local`
- `/usr/local/bin` locally compiled binaries
- `/usr/bin` installed binaries for users
- `/home` user data
- `/home/___` individual user directory (also `~`)
- `/boot` required to boot the system (like Linux kernel)
- `/dev` devices/hardware/drivers
- `/opt` optional/add-on software, rarely will be used
- `/var` variable files that change as the system is used (like log and cache files)
- `/tmp` temporary files
- `/proc` running processes
Detailed in the [Filesystem Hierarchy Standard](https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html).