I didn’t get to spend as much time tinkering and learning this week, but I still learned some new things!
- Wireguard is great! I had been using OpenVPN because when I initially set up my machine, my VPN had a bug with Wireguard. I was setting up a raspberry pi today for some more tinkering, and I decided to try Wireguard to see if the bug was fixed. Not only is it fixed, but Wireguard is much easier to work with. Not hating on OpenVPN, but I’ll definitely be preferring Wireguard going forward.
- Proper use of
find
, particularly with regex. This is ongoing. I’ve been using find for awhile, but not with full understanding of it’s options and syntax. I’m starting to get a better understanding of how to use it to find and manipulate the files I’m looking for. One of the biggest things that’s tripping me up withfind
and regex is designating the path. - How to set up a new user. This was interesting. I already knew the basics,
adduser -m username
,sudo passwd username
, but what I didn’t know anything about was--skel
for copying over the skeleton shell config files. I didn’t even know the skeleton config files existed. - The shell prompt can be customized. This was interesting. I was setting up a non root user on a vps that I have, and after creating the user, all I had was the
prompt. No
user@host
, and no working directory. After some reading I found that addingPS1='$(whoami)@$(hostname):$(pwd)$ '
to ~/.profile will show a more traditionaluser@host:working/directory$
prompt. I’m sure this is not the only way to do this, and may not be the best way to do it, but based on my limited knowledge, it is the way that I’m currently doing it on my vps.
As someone also starting to get into Linux I appreciate these posts
I’m glad they’re useful for you!
If you code adding the current branch to your shell prompt will change your world.
Also, if you are getting good use out of find, you should learn to pipe the output to GNU parallel. Put those cores to work!
check fd-find, “A simple, fast and user-friendly alternative to ‘find’”. Really good trust me
Check out using something like oh-my-zsh if you want a deeply configurable shell experience that isn’t super far off the stock bash path.
I kinda like fish tbh. The dracula theme is much better and is much better than stock zsh
Fish + starship is a killer combo.
I’ve heard of oh-my-zsh, but I haven’t wanted to deviate off of bash until I have a good grasp on bash first.
The project aims to make Bash vs Zsh as similar as possible. There is little difference except for customization. Switching to Fish or Spaceship will jump that barrier.
Interesting. I’ll give it a look.
I really need to learn find.
How is the rust replacement?
I’m not familiar with the rust replacement
How is the rust replacement?
fd > find. It’s a lot faster, and I find the syntax to be better.
My advice: make your home directory a git directory. You can ignore everything in a gitignore, then make exceptions, like your vim configs, shell configay and so on. You have version control and on a new host you can just git clone and bam, you have your usual setup.
Or simply create a dotfiles repo and symlink configs.
Yes, this. Don’t put your whole home directory in git.
I’ve never used git to publish/make myself a repo before. That’s something I’ve been meaning to learn but haven’t quite gotten there yet. However, with the amount of tinkering, and breaking I’ve been doing, I think I’ll move it up on my priority list.
I’ve also got shell scripts I’ve been writing and tinkering with and having proper version control (versus script, script.copy, script.copy.bak…) would also be nice.
It’s not actually hard if you know some high level basics. I recommend to use a git GUI or tui, makes things even easier. I personally use lazygit.
I’m diving in. I set up gitea on my server. Now I need to learn how to use git with gitea.
Amazing. I’ve switched to forgejo, thr gitea projects are amazing and I’m awaiting federation.