Give Your Dotfiles a Home with GNU Stow

  Рет қаралды 31,616

System Crafters

System Crafters

Күн бұрын

In this video, I'll show you how easy it is to use GNU Stow to create symbolic links from the configuration files in your dotfiles folder to your home directory! No more custom scripts to set up a new machine, just a single command.
Show notes: systemcrafters.net/managing-y...
Related videos:
- How to Create a Dotfiles Folder: • How to Create a Dotfil...
If you enjoy the content I make on this channel, please consider supporting my work: systemcrafters.net/support-th...
Get System Crafters merch here: store.systemcrafters.net?
Chapters:
- 00:00 Intro
- 00:21 Getting started
- 01:55 About GNU Stow
- 02:25 Basic usage
- 05:08 How it works
- 08:05 Ignoring files and directories
- 12:37 Cleaning up symbolic links
- 13:24 Don't forget to stow!
My Emacs configuration: config.daviwil.com/emacs
My system configurations: config.daviwil.com/systems
Chat with the System Crafters community on Discord and IRC: systemcrafters.chat
Follow me on Twitter for more GNU Emacs and GNU Guix content!
/ systemcrafters
Check out my other video series!
- Emacs Essentials: • The Absolute Beginner'...
- Emacs From Scratch: • Emacs From Scratch #1 ...
- Emacs Tips: • Emacs Tips - How to Sh...
- Emacs Desktop Environment: • Emacs Desktop Environm...
- Emacs IDE: • Emacs From Scratch #8 ...
- Emacs Mail: • Streamline Your E-mail...
- Learning Emacs Lisp: • Introduction to Emacs ...
- Craft Your System with GNU Guix: • An Introduction to GNU...
Thumbnail image credits:
Photo by Maksym Kaharlytskyi on Unsplash: unsplash.com/photos/Q9y3LRuuxmg
GNU logo by Vladimir Zúñiga: www.gnu.org/graphics/runfreeg...
Music credits:
Coriolis Effect by logos feat. stefsax, licensed Creative Commons 3.0 CC-BY ccmixter.org/files/mseq/26296
reNovation by airtone, licensed Creative Commons 3.0 CC-BY ccmixter.org/files/airtone/60674
ukeSounds by airtone, licensed Creative Commons 3.0 CC-BY ccmixter.org/files/airtone/32655
Between Worlds (Instrumental) by Aussens@iter, licensed Creative Commons 3.0 CC-BY ccmixter.org/files/tobias_webe...

Пікірлер: 61
@crazychicken0378
@crazychicken0378 2 жыл бұрын
This isn’t just a lisp channel, it’s a gnu channel imo. Guix, emacs/emacs lisp, stow, screen, yeah you don’t give me the vibe that people usually do but you’re a really cool free software advocate without being a free software advocate haha
@SystemCrafters
@SystemCrafters 2 жыл бұрын
Just curious, what vibe do others give you?
@crazychicken0378
@crazychicken0378 2 жыл бұрын
@@SystemCrafters they can be a bit pushy and rude about not using free software. I just see you as sharing something you thought would be very productive
@Magnus_E
@Magnus_E 2 жыл бұрын
@@SystemCrafters You are amazing never forget that. You give dotfiles/video slides in every (or almost? idk) video you make this is really helpful for us/me. Thanks for the amazing content. You don't need to worry about everybody, only for good people ;) :D:D:D Take care!
@skia5635
@skia5635 2 жыл бұрын
That's why I subscribed
@ViniciusProvenzano
@ViniciusProvenzano 2 жыл бұрын
Great video! Stow changed my life a few years ago.
@DavidWenzlick
@DavidWenzlick 2 жыл бұрын
This video just saved me a boat load of time. I have been managing my dotfiles in git for a while now, but I never took the time to automate the symlink creation. I was about 30% of the way done automation the symlink creation via a custom bash script. Now I don't need to finish that project and can work on more interesting things. Thank you!
@SystemCrafters
@SystemCrafters 2 жыл бұрын
Awesome, really glad to hear that! I also tried writing a custom bash script for this in the past, it was a pain
@samrjack
@samrjack 2 жыл бұрын
Was waiting for this vid since your dot files video! Thanks for the content.
@Timjstewart
@Timjstewart 2 жыл бұрын
Thanks for providing the synchronizing script!
@pauljamesharper
@pauljamesharper 2 жыл бұрын
I have been using 'Prot's Dots for Debian' for a while now. It uses Stow. But I really appreciate the detailed explanation. Especially the syncing script.
@humanlytyped
@humanlytyped 2 жыл бұрын
Thanks for this video. I'll use ansible to manage my system packages and stow for managing my dotfiles. This is good.
@JanneSauvala
@JanneSauvala 2 жыл бұрын
Thanks, great video!
@superspectator123
@superspectator123 Жыл бұрын
Very good video. Thank you.
@dmitryshinkaruk8024
@dmitryshinkaruk8024 2 жыл бұрын
Thank you some much for this!
@Xdavidel
@Xdavidel 2 жыл бұрын
One thing I'm exploring is using org mode to tangle one big dotfile into multiple configs and place them in the right place depending on the system.
@SystemCrafters
@SystemCrafters 2 жыл бұрын
Definitely possible! I think ultimately some files won't really belong in the Org-based config so you may end up using a combination of both. That's one scenario I'm trying to account for with my own dotcrafter.el package (which isn't fully ready for use yet)
@diegonayalazo
@diegonayalazo 2 жыл бұрын
Thanks!!!
@FekuEntertainmentLtd
@FekuEntertainmentLtd 2 жыл бұрын
Another cool thing about stow / Another way to organize is to have folders inside your ~/.dotfiles folder for specific configs. Like for e.g. I keep all my bash configs, like .bashrc, .bash_aliases, etc inside ~/.dotfiles/bash and I can simply do a "stow bash" if I want to include that in my $HOME. The reason for the separate folders in that, on my personal machine I use fish shell. So I don't want to stow that on my office machine, where people have bash scripts written all over the codebase. Basically, I can choose what things I want to stow where I want to stow.
@nichtgestalt
@nichtgestalt 2 жыл бұрын
I'm always coming back to you! First because of Emacs, than Gnu GUIX and now Gnu Stow. Does it also manage the permissions of the files? For example sxhkdrc and bspwmrc needs to be executable and as far as I know files cloned from github are not executable. Anyway, this really looks super convenient and I'll definitely give it a try. So thank you very much for this awesome tutorial. :D
@TheGreatMcPain
@TheGreatMcPain 2 жыл бұрын
If stow throws an error about a normal file that already exists, instead of deleting that file in the home directory it might be better to re-run stow with the '--adopt' parameter. This parameter imports existing files into your stow directory, and then creates a symlink. Unfortunately it won't work on files that are already symlinks, but at least it'll take care of the bulk of it automatically. Also, assuming the stow directory is under version control you'll be able see differences between your repository, and the files that got "adopted".
@SystemCrafters
@SystemCrafters 2 жыл бұрын
Yep, I saw the adopt parameter there but wasn't sure if it's more dangerous to suggest it in case someone breaks their setup with it
@oskarwerner2164
@oskarwerner2164 4 ай бұрын
If you use emacs and "Symbolic link to Git-controlled source file; follow link? (yes or no)" show up, just add (setq vc-follow-symlinks t) to you config.
@famailiaanima
@famailiaanima 2 жыл бұрын
For some reason I can't ingore a file in my .stow-local-ignore. It is a simple .txt file in .dotfiles/. Anyone knows how to do this?
@davidvogel2387
@davidvogel2387 2 жыл бұрын
Thanks David informative vid. Are you able to manage multiple os’s with Stow? Are conditional expressions allowed? I’m running on both linux and darwin. Lastly, does stow have the ability to manage secrets? Thxs
@SystemCrafters
@SystemCrafters 2 жыл бұрын
Stow only manages symbolic links so I use Org Babel to tangle out configurations with per-machine customizations and I store secrets in the `pass` program.
@tarikzaki5442
@tarikzaki5442 2 жыл бұрын
do i have to delete the files in the home directory before stow-ing them ?
@some_phd7655
@some_phd7655 2 жыл бұрын
nice starter video. I tried to use the provided script, but I run into some permission denied errors... I make the script executable with "chmod +x", but then I get permission denied on line 26 and 33...
@shawnzhuang1392
@shawnzhuang1392 2 жыл бұрын
awesome video thanks! what are you using to display the show notes/presentation thing in the video?
@SystemCrafters
@SystemCrafters 2 жыл бұрын
Check out the latest video on the channel, I explain it in detail!
@shawnzhuang1392
@shawnzhuang1392 2 жыл бұрын
thank u!!
@azinsharaf222
@azinsharaf222 Жыл бұрын
and what font are you using in the slides? it looks nice
@TheRcortezk9
@TheRcortezk9 Жыл бұрын
I have a newbie question. Could you reverse the order? For example, could you symlink from the $HOME to another file?
@AlwynSchoeman
@AlwynSchoeman Жыл бұрын
Is there any alternative to stow that allows you to manage different versions of a package. For example, you may different neovim configurations of emacs configurations, all of which wants to live in the same folder...
@lieutanant8058
@lieutanant8058 Жыл бұрын
Are there any advantages of Stow over something like org-mode with source blocks tangling to a config file? I currently use this and am very happy with it.
@vp4744
@vp4744 Жыл бұрын
Both solutions are customary, i.e., you learn by habit and custom. If you don't need the functionality, then it becomes a burden with no payoff. I'm moving from org tangling to stow for packages I need to compile and juggle several versions. Stow helps me automate compiling, testing, error reporting and deleting. Org tangling can't do all that without replicating what stow does.
@camrouxbg
@camrouxbg 2 жыл бұрын
This is great! Though I'm confused a bit about the sync-then-stow thing. I would have thought that the symlinks meant the ~/.profile always points to ~/.dotfiles/.profile, and so modifying ~/.dotfiles/.profile would be instantly seen by ~/.profile. Maybe I'm just not understanding how git works (it is likely, I only use it for this and I'm not a programmer, per se). That said, I'm getting some errors when I run stow. "Absolute/relative mismatch between Stow dir .dotfiles and path /home/brad/.dotfiles/.zshrc", followed by "existing target is not owned by stow: .zshrc". I probably missed something simple in the video, so I'll rewatch anyway :)
@SystemCrafters
@SystemCrafters 2 жыл бұрын
You're right, if a folder has been symlinked then you won't need to worry about it, but if a new folder or file has been added which hasn't already been linked then a new link will need to be created in the home folder for it. Regarding the errors, you need to make sure that the target files don't currently exist in the target folder, so if you copied your .zshrc file to ~/.dotfiles you probably need to delete the original in your home folder before it will work.
@camrouxbg
@camrouxbg 2 жыл бұрын
All good. I hadn't deleted the links I already had in my home and .config directories.
@camrouxbg
@camrouxbg 2 жыл бұрын
@@SystemCrafters Okay, I see. So it's a safety mechanism more than anything. To be safe, make sure you commit then stow.
@pascal7947
@pascal7947 2 жыл бұрын
I use a git bare repository to manage my dotfiles with git. Does GNU Stow have an easy way to manage difference in dotfiles on 2 machines?
@SystemCrafters
@SystemCrafters 2 жыл бұрын
Check out the comment on this video by Adam Logghe for an approach you can use for that
@To1ne
@To1ne 2 жыл бұрын
There seems to be a small delay on your video. Please consider adding a delay to your audio in OBS to sync them up (easy to test when you clap your hands).
@SystemCrafters
@SystemCrafters 2 жыл бұрын
I believe I caused this problem while editing, do you notice the problem in other videos?
@To1ne
@To1ne 2 жыл бұрын
@@SystemCrafters I originally saw it in kzfaq.info/get/bejne/sL15ddynnbCzops.html, where it shows a lot more.
@abrampers
@abrampers 2 жыл бұрын
I'm currently using rcm for dotfiles manager. Do you have any pros and cons of stow compared to rcm?
@SystemCrafters
@SystemCrafters 2 жыл бұрын
I haven't tried rcm yet!
@Mohamed_Fayyad
@Mohamed_Fayyad 8 ай бұрын
I am a beginner in Linux, and when I was searching for how to save dot files, I noticed two methods, one using git bare repository and the other method using stow. What is the difference between them? Why do I use one method over the other?
@amit12000
@amit12000 2 жыл бұрын
why not git bare method any specific reason
@FirkraagAurel
@FirkraagAurel 2 жыл бұрын
Stow is pretty buggy and 2+ year old bugs don't get fixed/deployed. Especially the "--dotfiles don't work with directories bug" is bad. Alternatives?
@laughingvampire7555
@laughingvampire7555 Жыл бұрын
the problem with stow is that you pollute the file system with links, this is why the guys at Atlassian proposed the git bare repo.
@azinsharaf222
@azinsharaf222 Жыл бұрын
Hi. What is the app you created the slides?
@kiddjmadd
@kiddjmadd Жыл бұрын
kzfaq.info/get/bejne/iamAoqlitbq-oH0.html
@nevoyu
@nevoyu 2 жыл бұрын
And here I just use a bare git repo
@sayanghosh6996
@sayanghosh6996 5 ай бұрын
11:14 stop using `-rf` when its not required. Always use principle of least priviledge. If you are removing just a normal file, you dont need -r or -f. This bad habit can lead you to delete some important folder by mistake if you type name of a folder instead of some file you wanted to delete, and -r and -f will make sure to delete that folder without warnings.
NEVER lose dotfiles again with GNU Stow
14:33
typecraft
Рет қаралды 33 М.
The Basics of Dotfiles
17:18
System Crafters
Рет қаралды 16 М.
Box jumping challenge, who stepped on the trap? #FunnyFamily #PartyGames
00:31
Family Games Media
Рет қаралды 19 МЛН
Inside Out 2: Who is the strongest? Joy vs Envy vs Anger #shorts #animation
00:22
ЧУТЬ НЕ УТОНУЛ #shorts
00:27
Паша Осадчий
Рет қаралды 10 МЛН
Каха заблудился в горах
00:57
К-Media
Рет қаралды 10 МЛН
5 Org Roam Hacks for Better Productivity in Emacs
29:45
System Crafters
Рет қаралды 29 М.
Home Directory Cluttered With Dotfiles? Move Them!
11:45
DistroTube
Рет қаралды 22 М.
Manage Your Dotfiles Like A Superhero
25:39
Jake Wiesler
Рет қаралды 15 М.
Sync your .dotfiles with git and GNU #Stow like a pro!
38:16
DevInsideYou
Рет қаралды 29 М.
~/.dotfiles in 100 Seconds
13:54
Fireship
Рет қаралды 413 М.
Getting Started with Org Roam - Build a Second Brain in Emacs
34:19
System Crafters
Рет қаралды 143 М.
Capturing Notes Efficiently in Emacs with Org Roam
31:06
System Crafters
Рет қаралды 43 М.
Dotfiles! Here's how I organize them.
9:37
Andrew Burgess
Рет қаралды 41 М.
Manage your dotfiles across multiple machines with GNU Stow and Git
12:27
Linux File System/Structure Explained!
15:59
DorianDotSlash
Рет қаралды 4,1 МЛН
Это - iPhone 16!
16:29
Rozetked
Рет қаралды 440 М.
Опасность фирменной зарядки Apple
0:57
SuperCrastan
Рет қаралды 12 МЛН
Как противодействовать FPV дронам
44:34
Стратег Диванного Легиона
Рет қаралды 117 М.
My iPhone 15 pro max 😱🫣😂
0:21
Nadir Show
Рет қаралды 1,9 МЛН