this post was submitted on 18 Mar 2024
8 points (83.3% liked)

Linux

8095 readers
19 users here now

Welcome to c/linux!

Welcome to our thriving Linux community! Whether you're a seasoned Linux enthusiast or just starting your journey, we're excited to have you here. Explore, learn, and collaborate with like-minded individuals who share a passion for open-source software and the endless possibilities it offers. Together, let's dive into the world of Linux and embrace the power of freedom, customization, and innovation. Enjoy your stay and feel free to join the vibrant discussions that await you!

Rules:

  1. Stay on topic: Posts and discussions should be related to Linux, open source software, and related technologies.

  2. Be respectful: Treat fellow community members with respect and courtesy.

  3. Quality over quantity: Share informative and thought-provoking content.

  4. No spam or self-promotion: Avoid excessive self-promotion or spamming.

  5. No NSFW adult content

  6. Follow general lemmy guidelines.

founded 1 year ago
MODERATORS
 

I've set some path variables on my Raspberry Pi, but since I upgraded the D compiler version, I need to change it, by removing the reference to the old version, as the two would collide with each other. The issue is, I used some now obscure tutorial, which I no longer can find, and it's not found in the usual culprit /etc/profile, yet the path is still listed with an echo $PATH.

I need to get the list of bootup scripts where it was added (it was added with something like that if I remember correctly), or somehow reset it without reinstalling the Linux to my Pi. I'll give my paths a more generic names in the future, so I can just rename a folder, then use the compiler right out of the box without having to mess around with the path yet again.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 4 points 8 months ago* (last edited 8 months ago) (1 children)

I'm surprised to encounter someone who uses a D compiler but doesn't know much about environment variables or unix shells.

Due to the nonexistent documentation for the issue,

Are you familiar with the man command, for reading the system's manual pages? When you get some time, you might want to run man bash and read whatever sections are relevant to things you want to do, such as where the Invocation section talks about startup files.

I’ll give my paths a more generic names in the future, so I can just rename a folder, then use the compiler right out of the box without having to mess around with the path yet again.

Creating a symlink (symbolic link) with a generic name to point at the version-specific directory name is a common way to do this. (For example, ln -s dmd-2.107.1 dmd) You could then add the symlink's path to your PATH environment variable, and replace the symlink whenever you want to point it at a different compiler version. Run man ln for more info.

I also suggest finding a beginner's guide to linux (or unix) when you get a chance. This stuff gets a lot easier once you learn the basics.

[–] [email protected] 1 points 7 months ago

I use LDC2 on the Pi, since that's my only option there.