Posts tagged: linux
All posts with the tag "linux"
Tailscale allows you to ssh into all of your tailscale machines, it busts through firewalls and accross networks without complex setup. If you have used tailscale before this is an obvious no brainer. What is not obvious is that you can configure tailscale to allow ssh connections from devices within your tailnet without even a ssh daemon process running right through the tailscale daemon.
tailscale status
tailscale set --ssh
I picked this up from the tailscale youtube channel.
just has been by go to tool for saving
commands in a way that I can replay them and have team members replay them
without relying on the shell history of any given machine. This is my go to
default step, it lets you pick a just command to run with a fuzzy picker.
default:
@just --list
TIL how to display the list of nfs mounts on your network.
showmount -e
You can even look for mounts of other machines on your network.
showmount -e <hostname>
With the liscense changes to redis there are several new forks out there. One that I am particularly interested in is redka.
curl https://i.jpillora.com/nalgeon/redka | bash
chmod +x redka
./redka database.db
We now have redis running on port 6379 that we can connect to with a redis client. And we have a sqlite database that we can inspect.
❯ sqlite3 database.db "SELECT name FROM sqlite_master;"
rkey
rkey_key_idx
rkey_etime_idx
rkey_on_type_update
rstring
rstring_pk_idx
vstring
rhash
rhash_pk_idx
rhash_key_id_idx
vhash
We can look at the values in the vstring table.
sqlite3 database.db "SELECT * from vstring;"
1|hi|hello there you||2024-04-17 01:46:26
The main system that I am concerned about is my arch BTW machine. I found a great article from the official archlinux site covering it.
For my machine I am concerned with this line.
The xz packages prior to version 5.6.1-2 (specifically 5.6.0-1 and 5.6.1-1) contain this backdoor.
I checked my xz package with AUR.">paru, and I am good.
paru -Qii zx
AUR.">paru has some nice features that I rarely use, and hav to look up when I need them. Here are two commands to help with dependency management.
❯ paru -Qii nodejs
Name : nodejs
Version : 21.7.2-1
Description : Evented I/O for V8 javascript
Architecture : x86_64
URL : https://nodejs.org/
Licenses : MIT
Groups : None
Provides : None
Depends On : icu libuv libnghttp2 libnghttp3 libngtcp2 openssl zlib brotli c-ares
Optional Deps : npm: nodejs package manager [installed]
Required By : node-gyp nodejs-nopt npm semver
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 46.86 MiB
Packager : Felix Yan <[email protected]>
Build Date : Thu 04 Apr 2024 05:11:09 AM CDT
Install Date : Mon 15 Apr 2024 07:27:02 AM CDT
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : Signature
Backup Files : None
Extended Data : pkgtype=pkg
You can check all the packages depended on by nodejs by running the following. This is everything from all of the repos you have configured, not what you have installed.
❯ pactree --reverse --sync --depth 1 nodejs
nodejs
├─acorn
├─ansible-language-server
├─asar
├─babel-cli
├─babel-core
├─bash-language-server
├─blinksocks
├─bower
├─browserify
├─coffeescript
├─dot-language-server
├─emscripten
├─eslint
├─eslint-language-server
├─eslint_d
├─gitlab
├─gnomon
├─grunt-cli
├─gtop
├─gulp
├─hedgedoc
├─jake
├─markdownlint-cli2
├─marked
├─marked-man
├─matrix-appservice-irc
├─modclean
├─node-gyp
├─nodejs-emojione
├─nodejs-material-design-icons
├─nodejs-nopt
├─nodejs-source-map
├─nodejs-yaml
├─npm
├─openui5
├─pm2
├─prettier
├─pyright
├─rapydscript-ng
├─s3rver
├─semver
├─serverless
├─stylelint
├─stylus
├─svelte-language-server
├─tailwindcss-language-server
├─ts-node
├─typescript
├─typescript-svelte-plugin
├─uglify-js
├─vscode-css-languageserver
├─vscode-html-languageserver
├─vscode-json-languageserver
├─vue-language-server
├─vue-typescript-plugin
├─wasm-bindgen
├─web-ext
├─wrangler
├─yaml-language-server
├─yarn
I recently updated ollama, and it now installs a systemd service that I was not expecting. Seems like a great option, but I hadn’t expeted this and I was able to kill it previously. It was using up gpu, and I do other things on my machine with a gpu. I tried pkill, kill, and everything, it was still coming back.
No matter what it comes back
# stop it
systemctl stop ollama.service
# disable it if you want
systemctl disable ollama.service
# confirm its status
systemctl status ollama.service
You can confirm this with the following command.
# checking running processes
ps aux | grep ollama
pgrep ollama
# checking gpu processes
gpustat --show-cmd --show-pid
Next time you want to start you can do it as before with ollama serve.