linux

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

chtk, in What's the best way to have a .bashrc that I can use throughout systems?
@chtk@feddit.nl avatar

You’ll want to look into a category of programs called dotfiles managers. There’s a bunch of them. Most of them are based on some kind of version control system, usually git.

I personally use yadm

gary_host_laptop,
@gary_host_laptop@lemmy.ml avatar

I think I maybe phrased it horribly, my question was more like, what do I need to learn in order to modify myself the .bashrc by myself instead of using a programme. Does it make sense?

OpenStars,
@OpenStars@discuss.online avatar

Bash syntax - I recommend Unix Power Tools by O’Reilly, but it is more advanced so maybe start with a basic version. People look at me funny whenever I say this, but I started myself with something like Unix for Dummies. Why not!?

Keep in mind that this is no trivial task: bash is basically a programming language unto itself - it even has conditionals, loops, variables, etc. Yet SO worth it if you use Unix and want to know more what it is doing.

You also should have a basic familiarity with Unix foundationals as well, to know why something such as this is very dangerous:

export PATH=“~/bin/:$PATH”

So, the easy way would be to just take the nice file, copy it wherever you want, and leave it at that. The hard way of actually understanding it may require a deeper dive into Unix. Unix Power Tools, with the picture of a drill on the cover, or maybe someone will recommend a better option but that’s what comes to my mind.

Have fun!:-)

dream_weasel,

So you can do what you like, but if you are going down the road of shell customization, I recommend you first consider if bash is the shell you want to keep by googling around and reading some articles.

I personally use ZSH (and I cannibalized ohmyzsh for the few configs I wanted instead of taking the whole giant bastard of a thing) but fsh is a fine choice if you don’t care about posix (a different discussion). There are some other options to consider as well, but if you’re gonna configure, don’t do it then do it again in a month with different syntax lol.

gary_host_laptop,
@gary_host_laptop@lemmy.ml avatar

Yeah, recently after posting this I went down a rabbit hole and found out about zsh and fish and I kind of like fish so I’m thinking about going straight to that, what a hard choice.

dream_weasel,

It’s a deep rabbit hole lol.

Elw,

This sounds really similar to how I do things but I use Ansible. What are the advantages to something like yadm, that is specifically designed for dot file management, and a generic config management utility like Ansible?

d3Xt3r, (edited )

I’ve only started using yadm recently so I may not be able to elaborate in detail, but for me the main draw for using yadm (as opposed to Ansible, which I use at work) is the simplicity. It’s basically just a bash script that uses git, so there’s no dependencies besides git and tools installed on most Unix systems. Ansible felt like overkill for what I needed, ie just something to manage and sync my dotfiles.

Also, maybe it’s personal bias, but I really hate installing/using Python-based programs - they often tend to go wild with their dependencies and eventually break. I recall trying to install Ansible on a Raspberry Pi at some point (via pip) and it failed because one of the dependencies couldn’t be compiled for whatever reason. I gave up after trying to fix it for a while, and dropped the idea. I’ve had similar experiences with other large Python projects, there’s always some drama. Why is why I prefer compiled binaries or simple shell scripts like yadm.

I’ve no issues using Ansible at work though. We use it on RHEL so it’s quite stable and doesn’t have the dependency issues you’d get on a bleeding-edge, ever-changing, end-user system. Plus it really shines at the Infrastructure as Code stuff so we use it to automate everything from networking gear to VMs. But I feel it’s overkill for something as simple as syncing a bunch of text files.

Dirk, (edited )
@Dirk@lemmy.ml avatar

I personally use yadm

I just use some code and Git.


<span style="color:#323232;">if [ ! -z "$PS1" ]; then
</span><span style="color:#323232;">    repo="${XDG_CONFIG_HOME}/dotfiles/"
</span><span style="color:#323232;">    br='origin/main'
</span><span style="color:#323232;">
</span><span style="color:#323232;">    title="e[1me[31mn ░▒▓e[7m    %s    e[27m▓▒░e[0mnn%snn"
</span><span style="color:#323232;">    status="$(git --git-dir="$repo" --work-tree="$HOME" status -s)"
</span><span style="color:#323232;">    diff=$(git --git-dir="$repo" --work-tree="$HOME" diff --stat --cached $br)
</span><span style="color:#323232;">
</span><span style="color:#323232;">    [ -n "$status" ] && printf "$title" "Uncommited changes!" "$status"
</span><span style="color:#323232;">    [ -n "$diff" ] && printf "$title" "Not yet pushed commits!" "$diff"
</span><span style="color:#323232;">
</span><span style="color:#323232;">    unset title status diff br
</span><span style="color:#323232;">    alias dotfiles="/usr/bin/git --git-dir=$repo --work-tree=$HOME"
</span><span style="color:#323232;">fi
</span>

The code runs when it’s an interactive shell with a PS1 prompt and just checks if any of the tracked files have changed or if there are commits that are not pushed. By configuration I ignore all untracked files. If something has changed or wasn’t pushed it always prints an annoying message.

Whenever I want to do something I use dotfiles … instead of git …, everything else works the same.

beejjorgensen,
@beejjorgensen@lemmy.sdf.org avatar

This is the fun way. I have a ton of configuration files in git and I symlink to them from various places with an install script. And zshrc has enough brains to determine the OS it’s running under and the hostname. Between those two, I can have it do all the Right Things no matter what system it’s on. So far, it deploys to my personal Mac, my work Mac, my personal Linux box, my SDF account, and my Android phone with tmux.

Basically I clone the repo into .local/share/beejsys and then run the install script and everything just works. And I don’t typically have to rerun the install script after a pull.

amzd,

Do I understand correctly you use the install script for files outside home dir? If so could you share this as I’m running into that issue.

beejjorgensen,
@beejjorgensen@lemmy.sdf.org avatar

No, they’re inside my home directory, alas.

aard, in Friendly reminder
@aard@kyu.de avatar

Friendly reminder: just don’t buy nvidia

CsXGF8uzUAOh6fqV,
@CsXGF8uzUAOh6fqV@lemmy.world avatar

Many already have nvidia before they start with linux. I’m still on my 1060 from 2018.

mhz,

I had one before, then 2060, then 2080 and finally 6800 (current one), how is your nvidia experience right now compared to 2018? Any better?

CsXGF8uzUAOh6fqV,
@CsXGF8uzUAOh6fqV@lemmy.world avatar

I started with linux begin 2019. I just use xorg so I don’t know about wayland problems. I think a long time ago nvidia broke once and I switched to nvidia-dkms and it has worked fine since until recently where a mesa update broke xorg but I don’t think that has to do with nvidia. Getting CUDA to work might be trouble though (I think I briefly tried once).

jjlinux,

Another problem is that most manufacturers of laptops directed at the Linux crowd, for some reason I will never understand, insist on punching Nvidia hardware instead of AMD/ATI. How does that help?

PseudoSpock,
@PseudoSpock@lemmy.dbzer0.com avatar

All these laptops make a circle… All these laptops make a circle… ;)

southernwolf,
@southernwolf@pawb.social avatar

Unfortunately for those of us that use Cuda features, AMD just really isn’t that viable of an alternative. Anyone who’s had to deal with ROCM can attest to this…

henrikx, in Is it actually dangerous to run Firefox as root?

My goodness

remotelove, in Is it actually dangerous to run Firefox as root?
@remotelove@lemmy.ca avatar

Your frame of mind is “dangerous”. If you are browsing on your servers as root, you need to not manage servers anymore. If that sounded harsh, learn about attack surface area first and then I might let you back in the server room.

You won’t find discussions about running browsers as root because it’s not something you should need to discuss. Also, you don’t need to be browsing “shady” websites to get compromised. Get that myth out of your head.

find it more convenient to use the command line from a remote desktop instead of directly SSH-ing into the system

How is extra steps and added latency more convenient? The latency of a console via remote desktop would drive me crazy. Hell, I haven’t installed any kind of desktop environment on Linux server for over 20 years. It’s not needed and a waste of resources. Who needs file managers anyway?

Potatos_are_not_friends, (edited )

Your frame of mind is “dangerous”. If you are browsing on your servers as root, you need to not manage servers anymore. If that sounded harsh, learn about attack surface area first and then I might let you back in the server room.

You sir/ma’am hit it right on the head.

The “run root on Firefox” isn’t the issue, it’s the red flag. Security is a mindset. Failure to understand the core philosophy of why we have roles and permissions means you’re untrusted. It really isn’t personal. It’s security.

DannyMac, in Linux reaches new high 3.82%
@DannyMac@lemmy.world avatar

On my laptop, I’ve switched to Linux since, despite being built in 2017, doesn’t meet Win 11’s min requirements. This is horseshit, I don’t care how MS explains it or justifies it, there’s nothing wrong with it. I’m sure during development, they realized a 20 year old computer could run Win 11 and decided to make up requirements to force people into buying new PCs.

Anyway, I’m using KDE Neon and I’m loving its ease of use and simplicity. I have barely needed to dive into the terminal to fix anything and KDE Plasma feels very polished and user friendly. To me, it feels like the new “normie-friendly” Linux. And without the horseshit telemetry and Microsoft spying, it’s like a brand new PC.

Limit,

I’m a sysadmin and we are in the very early stages of rolling out windows 11 to our users. Windows is windows, but I just can’t help but have observations that windows 11 looks like KDE did maybe 10 years ago? It’s like a badly themed linux distro from 2015…

BCsven,

It is arbitrary: my HP Zbook initially offered W11 upgrade, but we use corporate stuff and our software wasn’t certified on W11 yet so I held off. Months later we get a notice that the Zbook no longer meets requirements for W11 LOL

Corgana, in Linux reaches new high 3.82%
@Corgana@startrek.website avatar

I’m one of the converts. Didn’t like Windows 11 at all, decided to try Ubuntu/Zorin before going back to 10 and ended up staying. I’ve tried various distros many times over the past ~15 years but it never felt “ready” to me until now.

BCsven,

The last few years have had great improvements. For any average user (like a kid or adult that just browses web, streams video, zoom calls, etc) there is no reason a Linux desktop can’t be their main system.

Limit,

I’ve been really happy with fedora, specifically the KDE spin. Looks amazing and a lot of things just work.

Scraft161, in How do I have Japanese fonts displayed in Fedora?
@Scraft161@iusearchlinux.fyi avatar

If japanese kanji show as their Chinese variant make sure you are using the proper font variant. My recommendation is noto-sans-cjk-jp.

Fedora does allow you to set the locale, it doesn’t mention generating them so they might very well already be present You can use docs.fedoraproject.org/…/System_Locale_and_Keyboa… to read more than I can tell you here.

Reddfugee42, in Thoughts on this?

90ies

Ninety-ies?

yuki2501, in Linux reaches new high 3.82%
@yuki2501@lemmy.world avatar

For me the turning point was when a failed Windows forced upgrade ended up deleting me important files. I had backups, but I lost days of work because Microsoft felt so insecure in the face of piracy that they had to upgrade my computer despite me constantly telling them not to do so.

That was around 10 years ago. I went through various KDE distros; in the end I settled for Kubuntu.

The recent developments in KDE plasma are excellent. I haven’t had to open a command prompt in years. I hadn’t had a tech problem until this year when my tmp folder got full.

phoenixz,

I haven’t had to open a command prompt in years

Awesome!

I’m from the other side, though. I’m a developer and systems administrator on Kubuntu and I live by the command line. I use yakuake, which is totally awesome, and have about 50 or so shells open pretty much permanently, all nicely tucked away in tabs and sub sections in a programmable drop down that automatically starts all those command line shells when my computer boots. It’s pure awesomeness, Linus os pure awesomeness!

Hadriscus, (edited )

Damn, you know, I love automation and customization, and your description sounds awesome. I certainly will jump the gap at some point, but the thought of having to relearn an entire OS and suite of tools, and inevitably make mistakes that will cost me time and -probably- multiple reinstalls discourages me quite a bit. I remember using Fedora 20-something ten years ago on my laptop and the amount of things for which I needed a terminal was overwhelming. I also remember trying to learn file management by copying/backing up files from the terminal, and ending up batch-deleting entire folders worth of pictures. I never had a reliable “readme” for learning all this, that didn’t already assume I knew all the lingo and was proficient in some programming language.

Hammerheart,

I started using powershell more because it comes with a lot of bash aliases out of the box. Besides a brief period of using ubuntu in like 2006 because my windows install got corrupted, its my first foray into linux. Ive been daily driving debian 12 and i love it. I feel like getting used to the lingo helped ease the transition.

But if you actually use powershell for more than simple tasks and take advantage of its object oriented nature, it might make the switch harder. If you plan to use the command line as little as possible i think the switch is trivial. Your biggest worry is going to be analysis paralysis with all the options, but i just installed debian with the defaults and trying out different desktop environments is really easy and i havent yet had a problem that wasnt simple to solve with a google search.

Churbleyimyam,

Try a live USB - you might be surprised how easy and intuitive it is to use now.

yuki2501, (edited )
@yuki2501@lemmy.world avatar

Well, I have opened commands prompts, but only because because they’re fast at doing stuff with files and I like that.

But I haven’t NEEDED to open them to fix or configure stuff.

Back in the early 00s that was pretty much par for three course.

PanArab, in Linux reaches new high 3.82%

Please Mr Biden weaponize Android and Windows. We need your wise actions to spur the development of free and open alternatives.

phoenixz,

Android is practically Linux, it uses a Linux kernel and is also mostly open source though heavily controlled by Google

PanArab,

Yes, it does use a Linux kernel but no one would consider it open unless you limit yourself to AOSP. Google branded Android is closed and is regulated and restricted.

Informative article: arstechnica.com/…/googles-iron-grip-on-android-co…

erwan,

It uses the Linux kernel but the user space is so different that is has nothing in common with a regular Linux distribution.

Also it strongly depends on Google proprietary apps (and Play Store, Play Services…).

Yes you can have a de-Googled Android, but it’s still very different from a typical Linux install.

zxk, in Linux reaches new high 3.82%
@zxk@lemmy.world avatar

It was me checking out all the distros

markus99,

based autismo

shalva97,

I have spent 3 days trying to install 64bit Linux on a mini PC which has 32bit UEFI. The funny thing is that this device is so slow probably I will not use it, but I still want to make it work.

Decker108,

What brand is it? I’m waiting for my crowdfunded mini PC which will definitely be running Linux, so I’m curious as to other people’s experiences.

shalva97,

It is a ViewSonic, but I don’t know the model. I have it’s PCB and power supply only. CPU is Intel Atom x5-Z8350. Btw I have already installed Linux on it, was a really good feeling, now it is collecting dust on the shelf :D

fl42v, in Friendly reminder

BTW, nixos allows you to easily roll back to a previous generation on boot in case an update breaks something.

Just sayin’ 😁

mmhmm,

Opensuse’s aeon is gold

mvirts,

Woohoo

million,
@million@lemmy.world avatar

So does Fedora Silverblue for the record.

It is a damn impressive feature to realize you just broke your install and are able to say “no problem”.

reallyzen, (edited )
@reallyzen@lemmy.ml avatar

Si does tumbleweed, two-clicks rollback from the GRUB menu

greencactus,

Silverblue gang!

erwan, in Linux reaches new high 3.82%

Nice, at this pace we’ll reach 50% in less than 50 years!

nossaquesapao,

I know it’s a joke, but if linux keeps growing steadly, without saturating, it can reach a point in which it breaks the “I don’t use it because no one else does/ I don’t use it because my software isn’t supported” barrier and start to grow exponentially.

GustavoM, (edited ) in Is it actually dangerous to run Firefox as root?
@GustavoM@lemmy.world avatar

That’d be the same as asking if leaving your house front door open is dangerous – it depends. If an ill-intended individual sees it open however, s/he won’t think twice to trash your home.

minimalfootprint, (edited ) in Friendly reminder

Neat little guide (Arch, systemd) to set up automatic snapshots when you run a pacman/yay update and the option to chose snapshots in grub during startup. Really useful.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #