| Check how long a process has been running | Debian | ps -o etime -p 347159 | The part after -p is the process id. | Edit
Delete |
| Prioritize a running process. | Debian | renice -20 -p 785350 | This example sets a running process (Pid:785350) to a niceness of -20 ( the highest priority ). | Edit
Delete |
| Install network time service linux | Debian | apt install ntp -y | Manage it with systemctl. | Edit
Delete |
| Create a symbolic link for a file. | Debian | ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet | This example makes the dotnet executable discoverable by placing it in a folder which is present in the system PATH. | Edit
Delete |
| Find all files and folders by user. | Debian | find / -user pjk. | This example recursively finds everything owned by pjk. | Edit
Delete |
| Create an encrypted password. | Debian | echo 'Giraffes09' | openssl passwd -6 -stdin. | This example generates an encrypted string of "Giraffes09". | Edit
Delete |
| Change a partition label. | Debian | e2label /dev/nvme0n1p1 ArmbianBuilds. | The example labels the device ArmbianBuilds. | Edit
Delete |
| Add multicast dns to Linux. | Debian | apt install libnss-mdns. | Trying to resolve local dns issue. | Edit
Delete |
| Mount an img file. | Debian | mount -o loop,offset=16777216 Armbian_NanoPiM4V1_ScriptBuild.img /mnt/image/. | To calculate the offset for the mount command run fdisk -l yourimagefile.img and multiply the block size by the start sector, in this case it's 512 * 32768. | Edit
Delete |
| Ensure .bashrc fires on start of session... | Debian | Create a .profile in your $HOME and put this in it if [ -n "$BASH_VERSION" ]; then if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi fi. | Didn't used to need this. | Edit
Delete |