snooggums,
@snooggums@midwest.social avatar

I have windows PC with 6 drives, mostly SSD and on HDD that I assume are all NTFS. Two of the drives are nvme(?) attached to the mobo, and I only have one mobo with nvme slots. I have a number of older boards that top out at SATA connections.

If I install Linux Mint, can I format one nvme drive with whatever the current preferred linux formatting is, install Mint, and move the files from the other drives around as I format each one?

Or do I need to move all the data I want to keep to SATA drives, put them in a different windows box, and then copy them over using a network connection?

It’s been a while and I’m guessing my lack of finding an answer means linux still doesn’t work with NTFS enough to do what I’m thinking of.

bloodfart,

linux can read and write ntfs, edit partition tables and resize ntfs partitions

you could (theoretically, do not do this!) free up 8gb of space on your ssd in windows, defragment it then boot a linux installer and use it to shrink the ntfs partition and install ilnux in that 8gb.

Bitrot,
@Bitrot@lemmy.sdf.org avatar

You can test it from a live usb, generally ntfs works okay though.

NateSwift, (edited )

It depends on exactly how you plan to do things. The Linux kernel supports reading NTFS but not writing to it. I’m not sure exactly how full your drives are, but you might be able to consolidate some before installing Linux.

There are a couple utilities that let your mount an NTFS file system for read & write, but I wouldn’t trust them for important data.

Edit: This is outdated as of like 2021. Don’t listen to me

snooggums,
@snooggums@midwest.social avatar

As long as I can read from the second nvme drive I have enough total space to easily shuffle around.

My issue was that I couldn’t fit everything onto just the SSDs at the same time.

NateSwift,

Reading works great! If you need to mount the drive manually (IIRC Mint should do this for you) you’ll need to specify that it’s NTFS instead of it automatically detecting the file system but other than that it’s just plug and play

d3Xt3r,

The Linux kernel supports reading NTFS but not writing to it.

That’s not true. Since kernel 5.15, Linux uses the new NTFS3 driver, which supports both read and write. And performance wise it’s much better than the old ntfs-3g FUSE driver, and it’s also arguably better in stability too, since at least kernel 6.2.

Personally though, I’d recommend being on 6.8+ if you’re going to use NTFS seriously, or at the very least, 6.2 (as 6.2 introduces the mount options windows_names and nocase). @snooggums

NateSwift,

Today I learned. Cunningham’s law strikes again I guess

featured,

Linux NTFS support is pretty good. The kernel drivers do all the basics, but you may still want the ntfs-3g driver installed for some of its tools. Ntfsfix has saved me before and I think it’s from the ntfs-3g package

Nibodhika,

I was read/writing on NTFS partitions back in 2004, so your information that Linux doesn’t work with NTFS is at least 20 years old.

shadowintheday2, (edited )

You can freely manipulate NTFS in Linux. Just make sure your distribution has, after kernel >=5.15, enabled it, otherwise you may need to install the ntfs-eg driver. Other than that, Ach Wiki has info that may help you on any distro:

wiki.archlinux.org/title/NTFS

I have done something similar to what you want to do, just needed the ntfs-3g driver installed and “Disks” (gnome disks) application would mount/read/write the disks as usual

Sabata11792,
Sabata11792 avatar

I am still blowing up my install pretty often.

Other than the user folder, what else should I back up for a fast and painless reinstall next time I get too adventurous?
What should I break next?
Dose Nvidia hate me?
How do I stop Windows from fucking up my BIOS boot order every time?

NateSwift,

Does Nvidia hate me?

Yes

antrosapien,

Linus has succinctly told nvidia what to do

captain_aggravated,
@captain_aggravated@sh.itjust.works avatar

with which finger.

shadowintheday2,

Timeshift, make sure to “include hidden files” to recover any configuration for desktop environments

After a few mess ups, you may find yourself not needing to backup everything, only the file(s) that messed up, and that’s still a good thing to have Timeshift for

Sabata11792,
Sabata11792 avatar

It was built in. No more copy, pasting, and panicking.

bloodfart,

you can’t stop windows from fucking up the bios. part of what makes a windows update “better” for everyone else is it fucking up the bios for you.

you can make a bootable usb that you’re comfortable using and get familiar with pivoting root to your installed unbootable system and using it’s grub repair tools.

i haven’t worked with a linux system that didn’t include an automated utility that allowed you to straighten grub out with one command as long as you can get to its environment in like 16 years…

Interstellar_1,
@Interstellar_1@pawb.social avatar

Launching windows from the bootloader instead of the grub menu should help stop the issue with windows.

Sabata11792,
Sabata11792 avatar

Both OS are on different drives so the boot loaders don't see eachother. I don't trust Window not to fuck up my entire drive. I got to select the drive from my BIOS every time. I may just pull the SATA cable unless my ass hat friends want to play league.

wolf,

Depending on your skill level/experience/will to suffer:

  • Do every modification via the command line interface and keep notes
  • Create an Ansible configuration for your setup and you have
    • Instant perfect setup for your next installation
    • Ability to replicated your current setup exactly in a virtual machine, tweak it to your liking in the machine via Ansible and replicate your config back on the metal
Lettuceeatlettuce,
@Lettuceeatlettuce@lemmy.ml avatar

Timeshift will save you soooooo much pain. Set it up to auto backup a daily image. You can also manually create as many snapshots as you want.

Timeshift has turned system-destroying mistakes I’ve made into mere 5-10 minute inconveniences. You can use it in the command line, so even if you blow up your whole desktop environment/window manager, you can still restore back to a known gold state.

I create a snapshot before any major updates or customizations.

Sabata11792,
Sabata11792 avatar

Had no idea it existed, let alone already built in. Got my first backup squared away with almost 0 effort.

Lettuceeatlettuce,
@Lettuceeatlettuce@lemmy.ml avatar

Glad I could help! I wish I knew about it when I first started with Linux.

Sabata11792,
Sabata11792 avatar

Ill give it a week or 2 till I need to use one. Lol

dysprosium,

What is the system32 equivalent in linux

captain_aggravated,
@captain_aggravated@sh.itjust.works avatar

As in, the directory in which much of the operating system’s executable binaries are contained in?

They’ll be spread between /bin and /sbin, which might be symlinks to /usr/bin and /usr/sbin. Bonus points is /boot.

Gobo,
@Gobo@lemmy.world avatar

/usr/lib or /usr/lib64 or /lib (some distros) or /lib64

Some things (like hosts file) are in /etc. /etc mostly contains configs.

Bitrot,
@Bitrot@lemmy.sdf.org avatar

Don’t think there is.

system32 holds files that are in various places in Linux, because Windows often puts libraries with binaries and Linux shares them.

The bash in /bin depends on libraries in /lib for example.

julianh,

/bin, since that will include any basic programs (bash, ls, cd, etc.).

rollingflower,

What is system32? Outdated 32bit binaries?

KISSmyOSFeddit,

A weird catch-all folder for “most important Windows system stuff”. It’s not 32bit, just named like that in typical Windows fashion for backwards compatibility.

rollingflower,

Would probably be /usr and /bin, while some apps get installed to /opt or even /local or /var

ogeist,

For the memes:

sudo rm -rf /*

This deletes everything and is the most popular linux meme

The same “expected” functionality:

sudo rm -rf /bin/*

This deletes the main binaries. You kinda can recover here but I have never done it.

SmashFaster,
SmashFaster avatar

There is no direct equivalent, system32 is just a collection of libraries, exes, and confs.

Some of what others have said is accurate, but to explain a bit further:

Longer explanation:
::: spoiler spoiler
system32 is just some folder name the MS engineers came up back in the day.

Linux on the other hand has many distros, many different contributors, and generally just encourages a .. better .. separation for types of files, imho

The linux filesystem is well defined if you are inclined to research more about it.
Understanding the core principals will make understanding virtually everything else about "linux" easier, imho.

https://tldp.org/LDP/intro-linux/html/sect_03_01.html

tl;dr; "On a UNIX system, everything is a file; if something is not a file, it is a process."
:::

The basics:

  • /bin - base level executables, ls, mv, things like that
  • /sbin - super-level-only (root) executables, parted, reboot, etc
  • /lib - Somewhat self-explanatory, holds libraries, lots of things put their libs here, including linux kernel modules, /lib/modules/*, similar to system32's function of holding critical libraries
  • /etc - Configuration lives here, generally speaking, /etc/<application name> can point you in the right direction, typically requires super-user (root) to edit
  • /usr - "User installed" software, which can be a murky definition in today's world, but lots of stuff ends up here for installed software, manuals, icon files, executables

Bonus:

  • /opt - A special location, generally third-party, bundled-style software likes to use this, Java for instance, but historically some admins use it as the "company location", meaning internally developed software would live there.
  • /srv - Largely subjective, but myself and others I know use it for partitions that are outside the primary disk, for instance we use /srv/db for database volumes, /srv/www for web-data volumes, /srv/Media for large-file storage, etc, etc

For completeness:

  • /home - You'll find your user directories here, personally, this is my directory I backup, I don't carry much more with me on most systems.
  • /var - "Variable data", basically meaning any data that will likely grow over time, eg: /var/log
DmMacniel,

Oooh. I always wondered where I would put my docker bind shares in. I currently have them point to /Media but /srv makes so much more sense.

Blizzard, (edited )

Why do programs install somewhere instead of asking me where to?

EDIT: Thank you all, well explained.

julianh,

Someone already gave an answer, but the reason it’s done that way is because on Linux, generally programs don’t install themselves - a package manager installs them. Windows (outside of the windows store) just trusts programs to install themselves, and include their own uninstaller.

Max_P,
@Max_P@lemmy.max-p.me avatar

Expanding on the other explanations. On Windows, it’s fairly common for applications to come with a copy of everything they use in the form of DLL files, and you end up with many copies of various versions of those.

On Linux, the package manager manages all of that. So if say, an app needs GTK, then the package manager makes sure GTK is also installed. And since your distribution’s package manager manages everything and mostly all from source code, you get a version of the app specifically compiled for that version of GTK the distribution provides.

So if we were to do it kind of the Windows way, it would very, very quickly become a mess because it’s not just one big self contained package you drop in C:Program Files. Linux follows the FSH which roughly defines where things should be. Binaries go to /usr/bin, libraries to /usr/lib, shared files go to /usr/shared. A bunch of those locations are somewhat special, for example .desktop files in /usr/share/applications show up in the menu to launch them. That said Linux does have a location for big standalone packages: that’s usually /opt.

There’s advantages and inconveniences with both methods. The Linux way has the advantage of being able to update libraries for all apps at once, and reduce clutter and things are generally more organized. You can guess where an icon file will be located most of the time because they all go to the same place, usually with a naming convention as well.

possiblylinux127,

Because dependencies. You also should not be installing things you download of the internet nor should you use install scripts.

The way you install software is your distros package manager or flatpak

penquin,

I wish every single app installed in the same directory. Would make life so much easier.

backhdlp,
@backhdlp@iusearchlinux.fyi avatar

They do! /bin has the executables, and /usr/share has everything else.

penquin,

Not all. I’ve had apps install in opt, flatpaks install in var out of all places. Some apps install in /etc/share/applications

teawrecks,

In /etc? Are you sure? /usr/share/applications has your system-wide .desktop files, (while .local/share/applications has user-level ones, kinda analogous to installing a program to AppData on Windows). And .desktop files could be interpreted at a high level as an “app”, even though they’re really just a simple description of how to advertise and launch an application from a GUI of some kind.

penquin,

OK, that was wrong. I meant usr/share/applications. Still, more than one place.

teawrecks,

The actual executables shouldn’t ever go in that folder though.

Typically packages installed through a package manager stick everything in their own folder in /usr/lib (for libs) and /usr/share (for any other data). Then they either put their executables directly in /usr/bin or symlink over to them.

That last part is usually what results in things not living in a consistent place. A package might have something that qualifies as both an executable and a lib, so they store it in their lib folder, but symlink to it from bin. Or they might not have a lib folder, and just put everything in their share folder and symlink to it from bin.

captain_aggravated,
@captain_aggravated@sh.itjust.works avatar

There is also /sbin or /usr/sbin, for executables only available to the superuser.

Ramin_HAL9001, (edited )

They do! /bin has the executables, and /usr/share has everything else.

Apps and executables are similar but separate things. An app is concept used in GUI desktop environments. They are a user-friendly front end to one or more executable in /usr/bin that is presented by the desktop environment (or app launcher) as a single thing. On Linux these apps are usually defined in a .desktop file. The apps installed by the Linux distribution’s package manager are typically in /usr/share/applications, and each one points to one of the executables in /usr/bin or /usr/libexec. You could even have two different “apps” launch a single executable, but each one using different CLI arguments to give the appearance of different apps.

The desktop environment you use might be reconfigured to display apps from multiple sources. You might also install apps from FlatHub, Lutris, Nix, Guix, or any of several other package managers. This is analogous to how in the CLI you need to set the “PATH” environment variable. If everything is configured properly (and that is not always the case), your desktop environment will show apps from all of these sources collected in the app launcher. Sometimes you have the same app installed by multiple sources, and you might wonder “why does Gnome shell show me OpenTTD twice?”

For end users who install apps from multiple other sources besides the default app store, there is no easy solution, no one agreed-upon algorithm to keep things easy. Windows, Mac OS, and Android all have the same problem. But I have always felt that Linux (especially Guix OS) has the best solution, which is automated package management.

bloodfart,

different strokes.

windows comes from the personal computing world and retains a bunch of stuff from it to this very day for no good reason, in this case there used to be no guarantee that a particular installation target would have the target directory mapped in a consistent way so the installer would make a guess and give the user a chance to change it.

if that sounds stupid, it is. no one writes in assembly anymore, they target the OS and nowadays the OS will have a consistent set of folders to install stuff to. we all know where the program “should” be installed to already.

but it didn’t used to be like that in the PC world! used to be your computer wasn’t a fixed purpose windows computer from the jump, never to be anything else. there were different OSes that people would use regularly and even different DOS environments which a person could use to run programs under. Hard disks weren’t disks inside the machine, but big beige external disks that you’d plug up, set beside the computer and access after booting. in that setup where a programmer targeted DOS (if they cared about the execution environment at all and didn’t just write for the processor) it made sense to ask where someone was gonna want to install their software, and to what extent they’d even want to start dirtying up the media they paid good money for with some knuckleheads weird files from some goofy program on a stack of floppy disks.

linux comes from the unix world, where the question of where something installs is easy and straightforward: it installs in $PATH. what is $PATH? it’s where the os will look when you try to run something to see if it can run any program by that name. if a program isn’t installed in $PATH then when you type its’ name in and hit enter the computer won’t know what the hell youre talking about and you’ll have to type it’s whole ass location out and hit enter.

Why didn’t unix systems that linux imitates ask you where to install stuff? because usually it wasn’t your choice! linux was unix for personal computers and unix was run on systems that took up whole rooms with all sorts of equipment. you might be the user of that system but never have access to the room with all the spinning disks and flashing lights, stuck on a terminal dialing in over a serial line.

so the assumption was that you’d have a variable in your user environment that would say where things were installed but not that you’d have the ability to change it or even install things.

so why in a linux environment would you ever install anything outside of $PATH or even want to be sure where something’s installed at all?

even under linux it can be useful to do either. installing outside of path keeps programs from being accidentally autocompleted or invoked. installing in a particular component of $PATH ($PATH can be many directories!) lets you put serious business programs that demand maximum performance on faster media.

so why the hell won’t linux systems give you the option of installing in a specific location or outside of $PATH altogether?

they will, but unlike windows, they don’t ask you. unless you specifically ask to do that unique and very abnormal operation, they just do the usual thing. when you want to install weirdly you gotta dig into your package manager and packaging system. sometimes you unzip a package and change a line in a file then zip it back up and install from your modified version.

Bitrot,
@Bitrot@lemmy.sdf.org avatar

Because Linux and the programs themselves expect specific files to be placed in specific places, rather than bunch of files in a single program directory like you have in Windows or (hidden) MacOS.

If you compile programs yourself you can choose to put things in different places. Some software is also built to be more self contained, like the Linux binaries of Firefox.

krash,

Actually, windows puts 95% of it files in a single directory, and sometimes you get a surprise DLL in your \system[32] folder.

shadowintheday2,

you install program A, it needs and installs libpotato then later you install program B that depends on libfries, and libfries depends on libpotato, however since you already have libpotato installed, only program B and libfries are installed The intelligence behind this is called a package manager

In windows when you install something, it usually installs itself as a standalone thing and complains/reaks when dependencies are not met - e.g having to install Visual C++ 2005-202x for games, JRE for java programs etc

instead of making you install everything that you need to run something complex, the package manager does this for you and keep tracks of where files are

and each package manager/distribution has an idea of where some files be stored

Wanderer,

Specifics aren’t important right now, as I problem won’t buy a new computer for a year.

What level of ability do I actually need to comfortably use Linux?

If I buy a new laptop would it be okay to just have Linux on it or I would I come into an eventual big problem?

I always thought it was beyond my abilities. Then I kind of thought about how low 90% of the publics computer skills are I’m probably better than them.

I like the idea of free open source and Microsoft is taking everyone for a ride so I’m willing to give them the middle finger and leave. So I’ll take some hardship but not a lot.

My limited skills: I taught myself SQL, once set up a Minecraft server, use vpns, comfortable in the ocean, can do basic VBA.

Also slightly unrealted. Why are computers so expensive! 12 years ago I bought a mid range laptop for £450. Back then I was talking about how my next mid range laptop will have dedicated graphics, can do VR and cost less. Seems like TVs and smartphones have moved on massively since then but laptops seem crap.

aniki,

IMO since time immemorial the hardest part of general computer use is getting from a blank disk to an operating system that’s fully functional, and Linux is better than Windows by a million miles and only second to Apple’s because Mac hardware is locked down.

Now, you will most definitely need to be familiar with the concept of commands, command line, files, and folders, but IMO it’s way easier than learning an interface, it’s universal [POSIX standard], and you’ll rarely need to use the terminal if you’re just doing basic desktop stuff.

Pizzasgood,
Pizzasgood avatar

My limited skills: I taught myself SQL, once set up a Minecraft server, use vpns, comfortable in the ocean, can do basic VBA.

Yeah, you'll be fine.

If I buy a new laptop would it be okay to just have Linux on it or I would I come into an eventual big problem?

There are some things to be aware of, but they're mostly not big problems.

One is hardware support. This is rarely an issue these days when it comes to the routine tech most people use, but it can still rear its head with more exotic stuff like VR headsets (no support for Occulus; use Valve) as well as mundane but very new chips. For a newly released laptop it's a good idea to check that the WiFi and Bluetooth chipsets on the model you want are supported before committing to a purchase, but they probably are.

If there are specific games you want to play, check if they work on Linux. Most games will these days; even Windows-only games will usually work with no more effort than switching on a compatibility setting in Steam. Some games do take a little fiddling though, and there are a few stragglers that just won't work at all (mostly only if they have really paranoid anti-cheat systems).

Similarly, if there's any specific software you need for your job or hobbies, make sure that there's a Linux version, a compatible alternative that runs on Linux, or that the software runs acceptably through Wine. There's usually a way to get what you need, but the quality may vary. Probably not an issue for you though or you'd have mentioned whatever specialty software you use when you asked the question.

Another small issue is that video streaming services often degrade your quality a little when you're on Linux due to paranoia about piracy. So if you want to watch movies with absolutely perfect clarity, you may want to keep Windows or another device around for that (e.g. a smart tv, Android tablet, or what have you). That said, I personally do all my video consumption from Linux, and the quality is still high enough that I mostly don't notice. I'm still on 1920x1080 screens though; I imagine this would be more frustrating on 4K. For a laptop, probably a non-issue.

On a related note, Blu-ray movies are encrypted. I don't know if this is still an issue since I haven't tried to watch one in years, but my experience was that watching Blu-ray is hit-and-miss. Basically the longer a given release has been out, the better the odds that somebody has found and published the key you need (which, if your system is set up right, can be automatically downloaded and applied so you don't have to actually think about it). For a new release, you might have to switch to another OS, commercial video software, a physical Blu-ray player, or resort to "pirating" the content you already paid for. Of course, this is only relevant if you get a laptop that actually has an optical drive in the first place. Many don't.

Wanderer,

Okay perfect. Looks like I’ll be giving it ago at some point.

Like you said there are some issues and I knew some and glad you mentioned some I didn’t know. But all seems resolvable as long as it is expected so thanks.

DosDude,
@DosDude@retrolemmy.com avatar

Is there a way to remove having to enter my password for everything?

Wake computer from Screensaver? Password.
Install something? Password.
Updates (biggest one. Updates should in my opinion just work without, because being up to date is important for security reasons)? Password.

I understand sudo needs a password,but all the other stuff I just want off. The frequency is rediculous. I don’t ever leave my house with my computer, and I don’t want to enter a password for my wife everytime she wants to use it.

dysprosium,

Asking the real question here. I hope there is a one way solution per application. But I doubt it. I hope you don’t get the usual answer that it’s “absolutely necessary” for security.

Bitrot,
@Bitrot@lemmy.sdf.org avatar

The things you listed can be customized.

Disable screen lock and it stops locking. This is a setting in gnome, probably in KDE, maybe in others.

Polkit can allow installing and updating in packagekit (like gnome software) without the password. I think this is default in Fedora, at least for the user marked as administrative. openSUSE actually has a gui for changing some of these privileges in the Security and Hardening settings.

aniki,

My rule of thumb is if it leaves the house, full FDE, SSHD disabled. If it’s connected to the internet it’s deny-all and allow-port, key auth only, and everything runs at the user level, and when it’s just desktops my password is just my first name, and it autologins.

onlinepersona,

These are all valid reasons to request a password 🤔

  • Wake computer from Screensaver? Password.

Check your screen saver settings. Dunno which desktop environment you’re using. KDE should allow you to not enter a password for this.

  • Install something? Password.
  • Updates (biggest one. Updates should in my opinion just work without, because being up to date is important for security reasons)? Password.

Installing stuff runs sudo in the background hence the password prompt. Updates = installing stuff. Look up “passwordless sudo”. At this point, when do you even want a password to be shown? If you don’t need a password, get rid of it entirely.

Anti Commercial AI thingyCC BY-NC-SA 4.0

Stillhart,

At this point, when do you even want a password to be shown? If you don’t need a password, get rid of it entirely.

Do you still do this by just pressing enter when you change your password? (i.e. entering no password as your password)

onlinepersona,

Yep, using an empty password should work. They keyring will also need an empty password.

Anti Commercial AI thingyCC BY-NC-SA 4.0

rollingflower,

Passwords are meant to protect against using privileged processes as the user. This comes from a very traditional multi-user system, where users should not touch the system.

If the actions that require authentication are supported by polkit (kde shows the ID when expanding the message) you can add a policy file in /etc/polkit-1/rules.d/

Take this file as an example

teawrecks,

For wake from screensaver/sleep, this should be configurable. Your window manager is locking your session, so you probably just need to turn that option off.

For installations and updates, I suspect you’re used to Windows-style UAC where it just asks you Yes or No for admin access in a modal overlay. As I understand it, this is easier said than done on linux due to an insistence on never running GUI applications as admin, which makes sense given how responsibilities are divided and the security and technical challenges involved. I will say, I agree 100% that this is a serious area that’s lacking for linux, but I also (think I) understand why no one has implemented something similar to UAC. I’ll try to give the shortest version I can:

All programs (on both Windows and Linux) are run as a user. It’s always possible for any program to have a bug in it that gives another program to opportunity to exploit the bug to hijack that program, and start executing arbitrary, malicious code as that user. For this reason, the philosophical stance on all OSes is, if it’s gonna happen, let’s not give them admin access to the whole machine if we can avoid it, so let’s try to run as much as possible as an unprivileged user.

On linux, the kernel-level processes and admin (root-level) account are fundamentally detached from running anything graphical. This means that it’s very hard to securely, and generically, pop up a window with just a Yes or No box to grant admin-level permissions. You can’t trust the window manager, it’s also unprivileged, but even if you could, it might be designed in a supremely insecure way, and allow just any app with a window to see and interact with any other app’s windows (Xorg), so it’s not safe to just pop up a simple Yes/No box, because then any other unprivileged application could just request root permissions, and then click Yes itself before you even see it. Polkit is possible because even if another app can press OK, you still need to enter the password (it’s not clear to me how you avoid other unprivileged apps from seeing the keystrokes typed into the polkit prompt).

On windows, since the admin/kernel level stuff is so tightly tied to the specific GUI that a user will be using, it can overlay its own GUI on top of all the other windows, and securely pop in to just say, “hey, this app wants to run as admin, is that cool?” and no other app running in user mode even knows it’s happening, not even their own window manager which is also running unprivileged. The default setting of UAC is to just prompt Yes/No, but if you crank it to max security you get something like linux (prompt for the password every time), and if you crank it to lowest security you get something closer to what others are commenting (disable the prompt, run things as root, and cross your fingers that nothing sneaks in).

I do think that this is a big deal when it comes to the adoption of linux over windows, so I would like to see someone come up with a kernel module or whatever is needed to make it happen. If someone who knows linux better than me can correct me where I’m wrong, I’d love to learn more, but that is how I understand it currently.

lemmyreader,

I understand sudo needs a password

You can configure sudo to not need a password for certain commands. Unfortunately the syntax and documentation for that is not easily readable. Doas which can be installed and used along side sudo is easier.

For software updates you can go for unattended-upgrades though if you turn off your computer when it is upgrading software you may have to fix the broken pieces.

DosDude,
@DosDude@retrolemmy.com avatar

I’ve tried unattended-upgrades once. And I couldn’t get it to work back then. It might be more user friendly now. Or it could just be me.

lemmyreader,

It’s not really user friendly, at least not how I know it. But useful for servers and when desktop computers are on for a long time. It would be a matter of enabling or disabling it with : sudo dpkg-reconfigure unattended-upgrades granted that you have the unattended-upgrades package installed. In that case I’m not sure when the background updates will start, though according to the Debian wiki the time for this can be configured.

But with Ubuntu a desktop user should be able to configure software updated to be done automatically via a GUI. help.ubuntu.com/…/AutomaticSecurityUpdates#Using_…

shadowintheday2, (edited )

You can configure this behavior for CLI, and by proxy could run GUI programs that require elevation through the CLI:

wiki.archlinux.org/title/Sudo#Using_visudo

Defaults passwd_timeout=0(avoids long running process/updates to timeout waiting for sudo password)

Defaults timestamp_type=global(This makes password typing and it’s expiry valid for ALL terminals, so you don’t need to type sudo’s password for everything you open after)

Defaults timestamp_timeout=10(change to any amount of minutes you wish)

The last one may be the difference between having to type the password every 5 minutes versus 1-2 times a day. Make sure you take security implications into account.

backhdlp,
@backhdlp@iusearchlinux.fyi avatar

I think something like


<span style="color:#323232;">%wheel ALL= NOPASSWD: /bin/apt
</span>

should be the right way of disabling the password for apt.

Nibodhika,

I understand sudo needs a password,but all the other stuff I just want off.

Sudo doesn’t need a password, in fact I have it configured not to on the computers that don’t leave the house. To do this open /etc/sudoers file (or some file inside /etc/sudoers.d/) and add a line like:


<span style="color:#323232;">nibodhika ALL=(ALL:ALL) NOPASSWD:ALL
</span>

You probably already have a similar one, either for your user or for a certain group (usually wheel), just need to add the NOPASSWD part.

As for the other parts you can configure the computer to not lock the screen (just turn it off) and for updates it depends on distro/DE but having passwordless sudo allows you to update via the terminal without password (although it should be possible to configure the GUI to work passwordless too)

Fiivemacs,

How do you get the flavor out of it?

cyclohexane,

I have a feeling this is a joke. Either way I’m not following sorry 😭

velox_vulnus,

Flavor, as in Lubuntu, Xubuntu, Kubuntu, etc.

Fiivemacs,

Xhank xou xor xplaining

DmMacniel,

You remove any installed desktop environment, so you only have a commandline. You also remove any command shell. Can’t get any less flavoured than that.

Dagamant,

You have to go a bit further and remove any package manager and customized utilities. Probably remove a bunch of scripts and aliases from the command environment as well.

TheRedSpade,

It’d probably be less work to install LFS at that point.

captain_aggravated,
@captain_aggravated@sh.itjust.works avatar

Install Mint Cinnamon and then take your pick of the available spices.

DmMacniel,

But spice tastes like Cinnamon?

Deconceptualist,

Install Linux From Scratch (LFS). Then you can give it your own flavor instead of someone else’s.

nyan,

Start with a minimalist distro that ships without any desktop environment, of which there are many.

vort3,
@vort3@lemmy.ml avatar

How do symlinks work from the point of view of software?

Imagine I have a file in my downloads folder called movie.mp4, and I have a symlink to it in my home folder.

Whenever I open the symlink, does the software (player) understand «oh this file seems like a symlink, I should go and open the original file», or it’s a filesystem level stuff and software (player) basically has no idea if a file I’m opening is a symlink or the original movie.mp4?

Can I use sync software (like Dropbox, Gdrive or whatever) to sync symlinks? Can I use sync software to sync actual files, but only have symlinks in my sync folder?

Is there a rule of thumb to predict how software behaves when dealing with symlinks?

I just don’t grok symbolic links.

aniki,

I’ll give you an idea of how I use symlinks –

I have a folder for all my gits. I love to write utilities and stuff in python and trigger them in a terminal. I also have ~/.local/bin in my $PATH so I make symlinks in the bin folder without the py extension to the scripts in my git folders.

I wrote a CLI util for interacting with Docker Harbor - so ~/gits/harbor-cli/harbor.py is symlinked to ~/local/bin/harbor

Now i can use harbor do-things easy peasy.

Also, file names usually just point to inodes on the disk. symlinks can point to those inodes, or to the filename.

bizdelnick,

Software opens a symlink the same way as a regular file. The kernel reads a path stored in a symlink and then opens a file with that path (or returns a error if unable to do this for some reason). But if a program needs to perform specific actions on symlinks, it is able to check the file type and resolve symlink path.

To determine how some specific software handle symlinks, read its documentation. It may have settigs like “follow symlinks” or “don’t follow symlinks”.

cyclohexane,

A symlink works more closely to the first way you described it. The software opening a symlink has to actually follow it. It’s possible for a software to not follow the symlink (either intentionally or not).

So your sync software has to actually be able to follow symlinks. I’m not familiar with how gdrive and similar solutions work, but I know this is possible with something like rsync

vort3,
@vort3@lemmy.ml avatar

So I guess it’s something like pressing ctrl+c: most software doesn’t specifically handle this hotkey so in general it will interrupt a running process, but software can choose to handle it differently (like in vim ctrl+C does not interrupt it).

Thanks.

Fun fact: pressing X (close button) on a window does not make it that your app is closed, it just sends a signal that you wish to close it, your app can choose what to do with this signal.

teawrecks,

An application can know that a file represents a soft link, but they don’t need to do anything differently to follow it. If the program just opens it, reads it, writes to it, etc, as though it were the original file, it will just work^tm^ without them needing to do anything differently.

It is possible for the software to not follow a soft symlink intentionally, yes (if they don’t follow it unintentionally, that might be a bug).

As for hard links, I’m not as certain, but I think these need to be supported at the filesystem level (which is why they often have specific restrictions), and the application can’t tell the difference.

the16bitgamer,
@the16bitgamer@lemmy.world avatar

ELI5: when a computer stores something like a file or a folder, it needs to know where it lives and where its contents are stored. Normally where the a file or folder lives is the same place as where its contents are. But there are times where a file may live in one place and its contents are elsewhere. That’s a symlink.

So for your video example, the original video is located in Downloads so the video file will say I am movie.mp4 and I live i live in downloads, and my contents are in downloads. While the symlink says, I am movie.mp4 I live in home, and my contents are in downloads over there.

For a video player, it doesn’t care if the file and the content is in the same place, it just need to know where the content lives.

Now how software will treat a symlink as an absolute. For example if you have 2 PCs synced with cloud storage, and both downloads and home is being synced between your 2 pcs. Your cloud storage will look at the symlink, access the content from pc1 and put your movie.mp4 in pc2’s downloads and home. But it will also put the contents in both places in pc2 since to it, the results are the same. One could make software sync without breaking the symlink, but it depends on the developer and the scope of the software.

Ramin_HAL9001, (edited )

Whenever I open the symlink, does the software (player) understand «oh this file seems like a symlink, I should go and open the original file», or it’s a filesystem level stuff and software (player) basically has no idea if a file I’m opening is a symlink or the original movie.mp4?

Others have answered well already, I just will say that symlinks work at the filesystem level, but the operating system is specially programmed to work with them. When a program asks the operating system to open a file at a given path, the OS will automatically “reference” the link, meaning it will detect a symlink and jump to the place where the symlink is pointing.

A program may choose to inspect whether a file is a symlink or not. By default, when a program opens a file, it simply allows the operating system to reference the file path for it.

But some apps that work on directories and files together (like “find”, “tar”, “zip”, or “git”) do need to worry about symlinks, and will check if a path is a symlink before deciding whether to reference it. For example, you can ask the “find” command to list only symlinks without referencing them: find -type l

bloodfart, (edited )

its a pointer.

E: Okay so someone downvoted “it’s a pointer”. Here goes. both hard links and symbolic links are pointers.

The hard link is a pointer to a spot on the block device, whereas the symbolic link is a pointer to the location in the filesystems list of shit.

That location in the filesystems list of shit is also a pointer.

So like if you have /var/2girls1cup.mov, and you click it, the os looks in the file system and sees that /var/2girls1cup.mov means 0x123456EF and it looks there to start reading data.

If you make a symlink to /var/2girls1cup.mov in /bin called “ls” then when you type “ls”, the os looks at the file in /bin/ls, sees that it points to /var/2girls1cup.mov, looks in the file system and sees that it’s at 0x123456EF and starts reading data there.

If you made a hard link in /bin called ls it would be a pointer to the location on the block device, 0x123456EF. You’d type “ls” and the os would look in the file system for /bin/ls, see that /bin/ls means 0x123456EF and start reading data from there.

Okay but who fucking cares? This is stupid!

If you made /bin/ls into /var/2girls1cup.mov with a symlink then you could use normal tools to work with it, looking at where it points, it’s attributes etc and like delete just the link or fully follow (dereference) the link and delete all the links in the chain including the last one which is the filesystems pointer to 0x123456EF called /var/2girls1cup.mov in our example.

If you made /bin/ls into a hardlink to 0x123456EF, then when you did stuff to it the os wouldn’t know it’s also called /var/2girls1cup.mov and when /bin/ls didn’t work as expected you’d have to diff the output of mediainfo on both files to see that it’s the same thing and then look where on the hard drive /var/2girls1cup.mov and /bin/ls point to and compare em to see oh, someone replaced my ls with a shock video using a hard link.

When you delete the /bin/ls hardlink, the os deletes the entry in the file system pointing to 0x123456EF and you are able to put normal /bin/ls back again. Deleting the hard link wouldn’t actually remove the data that comprises that file off the drive because “deleting” a “file” is just removing the file systems record that there’s something there to be aware of.

If instead of deleting the /bin/ls hardlink, you opened it up and replaced the video portion of its data with the music video to never gonna give you up, then when someone tried to open /var/2girls1cup.mov they’d instead see that music video.

if that is, the file wasn’t moved to another place on the block device when you changed it. Never gonna give you up has a much longer running time than 2girls1cup and without significant compression the os is gonna end up putting /bin/ls in a different place in the block device that can accommodate the longer data stream. If the os does that when you get done modifying your 2girls1cup /bin/ls into rickroll then /bin/ls will point to 0x654321EF or something and only you will experience astleys dulcet tones when you use ls, the old 0x123456EF location will still contain the data that /var/2girls1cup.mov is meant to point to and you will have played yourself.

Okay with all that said: how does the os know what to do when one of its standard utilities encounters a symlink? They have a standard behavior! It’s usually to “follow” (dereference) the link. What the fuck good would a symbolic link be if it didn’t get treated normally? Sometimes though, like with “ls” or “rm” you might want to see more information or just delete the link. In those cases you gotta look at how the software you’re trying to use treats links.

Or you can just make some directories and files with touch and try what you wanna do and see what happens, that’s what I do.

wolf,

Symlinks are fully transparent for all software just opening the file etc.

If the software really cares about this (like file managers) they can simply ask the Linux kernel for additional information, like what type of file it is.

0xtero,

A symlink is a file that contains a shortcut (text string that is automatically interpreted and followed by the operating system) reference to another file or directory in the system. It’s more or less like Windows shortcut.

If a symlink is deleted, its target remains unaffected. If the target is deleted, symlink still continues to point to non-existing file/directory. Symlinks can point to files or directories regardless of volume/partition (hardlinks can’t).

Different programs treat symlinks differently. Majority of software just treats them transparently and acts like they’re operating on a “real” file or directory. Sometimes this has unexpected results when they try to determine what the previous or current directory is.

There’s also software that needs to be “symlink aware” (like shells) and identify and manipulate them directly.

You can upload a symlink to Dropbox/Gdrive etc and it’ll appear as a normal file (probably just very small filesize), but it loses the ability to act like a shortcut, this is sometimes annoying if you use a cloud service for backups as it can create filename conflicts and you need to make sure it’s preserved as “symlink” when restored. Most backup software is “symlink aware”.

j4k3,
@j4k3@lemmy.ml avatar

Any word on the next generation of matrix math acceleration hardware? Is anything currently getting integrated into the kernel? Where are the gource branches looking interesting for hardware pulls and merges?

hello_hello,

matrix math acceleration hardware?

Can’t speak on that but if you want to get news about recent kernel developments (as well as hardware development) you should check out Phoronix.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • InstantRegret
  • DreamBathrooms
  • ngwrru68w68
  • osvaldo12
  • cubers
  • magazineikmin
  • ethstaker
  • Youngstown
  • rosin
  • slotface
  • everett
  • kavyap
  • Durango
  • khanakhh
  • megavids
  • thenastyranch
  • anitta
  • modclub
  • GTA5RPClips
  • mdbf
  • cisconetworking
  • tester
  • tacticalgear
  • provamag3
  • Leos
  • normalnudes
  • JUstTest
  • lostlight
  • All magazines