linux4noobs

3217 readers
1 users here now

linux4noobs


Noob Friendly, Expert Enabling

Whether you're a seasoned pro or the noobiest of noobs, you've found the right place for Linux support and information. With a dedication to supporting free and open source software, this community aims to ensure Linux fits your needs and works for you. From troubleshooting to tutorials, practical tips, news and more, all aspects of Linux are warmly welcomed. Join a community of like-minded enthusiasts and professionals driving Linux's ongoing evolution.


Seeking Support?

Community Rules

founded 2 years ago
MODERATORS
151
 
 

Inspired by this post by Randall Munroe.

I want something that does basically the same thing - mirror the keyboard's letter and common punctuation keys - but while pressing either of the Alt keys instead of using CapsLock. Also, I use Dvorak, not QWERTY.

I'd rather use my thumb as the modifier so that reaching the shift key in addition to the modifier key doesn't mess with my finger movement too much, and this way I'll be able to type one-handed with either my left or right hand. Also, I never use any of the Alt shortcuts that use the letter/punctuation keys, so getting rid of those shortcuts won't be a problem

Any ideas on how this could be accomplished? I'm on Linux Mint 21.3 Cinnamon (but also have a Mint MATE laptop that I'd like to replicate this on, if possible).

Edit: All I've tried so far is checking the keyboard layout options to try to turn off Alt shortcuts activating the top bar of applications, to free them up for the shortcuts I'd need, but no luck so far.

152
 
 

Hello, I broke my laptop about a week ago and could use a hand figuring out the best approach for recovering the files when my new laptop arrives

The laptop was running fedora and would have used whatever encryption option is default in the fedora installer (The laptop required a password before it'd fininish booting so I'm pretty confident it was encrypted), which I believe would be LUKS?

If I understand correctly the ssd is a socketed sata drive, so I figured I'd buy a sata drive enclosure when I get my new laptop that'd let me plug it in via USB

I have the password I needed to boot when the device was working, if I get a sata enclosure can I access the files?

Any input, guidance, thoughts or suggestions are appreciated :)

153
 
 

SOLVED by joneskind

I have Ubuntu 20.04.1, I've installed ollama and a couple llms, it's amazing, but tinyllama is gibberish and I've just realized I don't know how to remove the llms from my computer or where they're stored, or anything about them.

Mistral is very impressive btw

154
 
 
155
 
 

Previously used Endeavors, OpenSUSE, PopOS and GTA run 5 fps now on Fedora it run 25-40fps 1080 high

156
 
 

I got most of my games run pretty good now with the help of Steam compatibility and Wine now what should I do moving forward, win11 is a strong no go because I heard rumors about Microsoft locking bootloader with software update and I can't stand fucking copilot/edge, should I wait until EOL or do it now? I'm pretty noob when it comes to Linux but I know what distro I'll use (Fedora+KDE). Sorry for bad grammar English is not my first language

157
 
 

Pretty much the title. Maybe to add a bit of a backstory: Bazzite was awesome at first, all games ran on the first try!!

But then: I still haven't installed my vpn, let me quickly do that. Oh wait, there's no flatpak for my vpn, that's right.

Aight, lemme first install tlp and get these laptop fans under control. But wait, how? There's no flatpak. If I install it in distrobox, it has no effect, which kinda makes sense.

Whatever, lemme try auto-cpufreq. No flatpak, so distrobox it is. To no surprise, it fails. "System has not been booted with systems as init system."

Same with Goverlay. So then I just fell back into my chair and screamed: "How the hell do I install stuff on Bazzite to control my laptop?!"

158
 
 

why? because it's not triggering an obscure anti cheat on a game I've been playing when using wine (performance is still the same tho), everything else is just work no missing dependencies and it's doesn't get in my way like other distros (I tried Arch, Opensuse, Ubuntu, Debian), just to clarify I'm a complete noob when it come to Linux so maybe if I know better I probably make everything works just like Fedora

159
 
 

After 3 days I finally got doom running but it's not running very well (both on high setting 720p), not just doom I only got half the fps compared to windows on every games I tried, I'm so confused right now and I don't know what to do. I pretty new to Linux any help is appreciated, this is hardware I'm running on: AMD Ryzen 3 7320u, Radeon 610m, Nvme, Latest Wine and Endeavors OS with vulkan

160
 
 

I've been using Linux for the past 5 years, and recently I change from DE to WM (i3) which change it my whole workflow. Now I use a lot more the command line to do even simple things.

Recently I note that some relatives called me 'hacker' and I find that kinda funny, may be because I'm so accustomed to the terminal and to i3 that I don't notice that "it looks like a hacker thing".

161
 
 

SOLVED: Installed GloriousEggroll custom Proton. For Talos, also had to set launch options (PROTON_ENABLE_NVAPI=1 PROTON_LOG=1 %command%) or else I'd just get a black screen. First runs of games take a bit to get loaded, but launch without issue on subsequent runs.

I'm a recent convert to Linux - currently running Mint 21.2. I don't have a huge Steam library and thankfully most of the handful of games I play have worked fine - Deep Rock, Lethal Company, Sea of Thieves, Elite Dangerous (although that one is through Epic, thanks Heroic Launcher).

Two others that I've tried so far - Astroneer and Talos Principle II - don't seem to want to get started. When I hit play on either of those in Steam, it just stalls at "Launching..." I can cancel the launching and it'll go back to the Play button, but at this point Steam won't launch anything else. When I try to exit steam, the main window closes but its icon is still in the system tray icons. At this point, I have to kill the steam tasks before I can get it to re-open.

Since I'm seeing similar behavior for two different games, I'm guessing it might have something to do with the Proton config? I don't know much about it other than it being the main compatibility layer that gets the games running on Linux. In my Steam compatibility settings, I've got Steam Play enabled for supported and all other titles, and I've got "Run other titles with" set to Proton Experimental. I've seen that you can set the Proton version on a per-game basis as well. If that's the issue, is it just trial-and-error figuring out which version I need to use with each game?

162
 
 

I have been trying some of the immutable linux OSes because from what I understand they are more modern and feature better security and reliability. What I have found so far is shocking. Half of these don't support my laptop (probably because it's nvidia optimus). Some I tried like guix were very difficult to install, configure, and use with sprase documentation. Good luck trying to use KDE, wayland, or pipewire for example. BlendOS was notably better and could at least run on my laptop but chocked with nvidia driver issues.

I have switched to pop os on my laptop for now but looking at alternatives and what to install on my desktop.

163
164
 
 

I am trying to install this package on Nobara 38 but it only seems to be available on Deb and Ubuntu https://pkgs.org/download/libpcre3-dev

I've looked around and it seems I need to build the package from source but I cannot find the source or figure out how to build it. I downloaded libpcre3-dev_8.39-15_amd64.deb but im not sure what to do with the file.

I found the PCRE website but it doesn't have a libpcre3-dev https://www.pcre.org/

It might just be easier to do what I need to do in an ubuntu VM. Any advice on how to get this package installed would be appreciated.

165
 
 

One can create a file named .bash_aliases in their home directory to create aliases for that user.

Is there a way to create a .bash_aliases that is system wide for all users? I know one can add aliases in the /etc/bash.bashrc file but this is not ideal.

And is there a way to achieve this with other shells such as zsh and fish?

166
 
 

So I am hoping to finally get around to installing Linux for the first time. Ideally I would like to eventually replace my win10 installation with it, but for now I plan on dual booting until I am comfortable enough on Linux. This leads me to a couple questions:

  • which one is best suited for gaming? I do a couple other things as well but I would expect that any OS could deal with those. I know vaguely about proton / the steam deck improvements that trickled down, but don’t know if and how that affects different Linux versions.

  • I read some days ago that ubuntu is being used by Microsoft, does that mean it is more compatible with their other applications?

  • I also read that amd is better suited to linux because nvidia refuses to support it, which would be a happy coincidence for me because I just recently built a fully amd computer, is that actually true?

  • And lastly, provided there is even a definitive answer to my first question, where should I look to get started? I have never dealt with Linux before but would consider myself reasonably tech / computer savvy.

Thank you

167
 
 

I thought it might be nice to start a daily tips & tricks post to stimulate some conversation while offering up fundamental knowledge to those who might appreciate it. And it gives me something to get my brain going with my morning coffee. I intend for them to be very brief (this turned out to be a lie) and serve as a starting point for anyone who may wish to dig deeper through their own research or discussion.

Feel free to add any additional thoughts or questions in the comments. Certainly please correct me if I make any mistakes. If there are any topic requests for future tips & tricks, throw them out there or if you have one of your own you'd like to share, please post it. I'll try to post and/or feature one daily. If I don't have time to write my own and no one else has offered anything up, I'll find something interesting elsewhere to feature.


File Permissions and Ownership

Understanding permissions and ownership for files and directories gives you granular control over who can access and modify your files. Understanding this is especially essential for security and privacy. I'll be working in the terminal to explain:

View Permissions

To view permissions, run ls -l. This outputs a long listing of the files in your current directory. The information in the far left column are the permissions. It should be noted that everything in Linux is treated as a file, including directories. This isn't technically true, but you can think of it this way for our purposes here.

drwxr-xr-x is an example of permissions for one of my directories I'll refer to as funny_memes.

Permission Symbols
  • d = directory
  • r = read
  • w = write
  • x = execute
  • - = not set (or regular file)

For our purposes, you can ignore the first character. Most commonly you'll see 'd' or '-' to denote it being a directory or a regular file. There are also others you may wish to explore (symlinks, sockets, etc).

The 3 groups we are interested in each contain 3 characters. That is, 3 groups of 3. (I know this is confusing, but "group" is one of the groups of 3.) The order of these groups are 'user', 'group', and 'others'. That order is specific and important to remember. To use my funny_memes example, my current permissions are set as follows:

~$ ls -l

drwxr-xr-x. 1 PlutoParty PlutoParty 0 Aug 9 04:08 funny_memes

Type User Group Others
d rwx r-x r-x

This means the user who owns this directory can read, write, and execute. The group assigned to this directory can only read and execute. And all others can also only read and execute.

Ownership

In the ls -l output, the user and group assigned to the directory (or file) is displayed just after the permissions, in that order. In my example, PlutoParty is my user and PlutoParty is the group of the funny_memes directory.

Changing permissions

Octal Notation

Permissions can be changed with chmod using octal or symbolic notation. Understand the 3 bit octal notation is a little tricky to understand at first. In short, for each group (user, group, and others) the sum of the bits set determines the file permission. Individual permission bits are as follows:

  • 'r' (Read): 4
  • 'w' (Write): 2
  • 'x' (Execute): 1

If I wanted to give execute and read permission only to a user, group, or to others, for example, that permission value would be 5. (1 + 4). Full permissions would be 7. Read and write only would be 6. This works because every combination is a unique sum.

Here is a cheat sheet of all the combinations for reference:

Octal Value Permissions
0 No permissions
1 Execute only
2 Write only
3 Write and execute
4 Read only
5 Read and execute
6 Read and write
7 All permissions

The user, group, and others each get a value set. To change my funny_memes directory to full permissions for user, group, and others, I'd set that with chmod 777 funny_memes. Again, each number represents the sum of the permission bits you want assigned for user, group, and others, individually and in that order. 777 gives full permission to each of them because 4 (read) + 2 (write) + 1 (execute) = 7.

If I want to only allow the user full permissions (myself, in this case) and deny group and others anything, I'd run chmod 700 funny_memes. One more example is if I wanted to allow the user to read and write while only allowing the group and others to read, I'd use chmod 644 funny_memes

For many people, this is tricky to remember and understand at first. So, don't get frustrated. Write the individual permission bits down (read, write, and execute - not the full cheat sheet) from above and use it. You'll quickly have it memorized. It's really only 3 numbers to memorize. If you memorize those and remember that the order is user, group, others, you'll be a master at setting permissions with octal notation by the end of the day. In my opinion, it is actually easier than setting with symbolic notation, which we'll get familiar with now.

Symbolic Notation

  • u : owner of the file.
  • g : group associated with the file.
  • o : users who are not the owner or part of the group (others).
  • a : all users (or you can also use ugo combined).

Permissions:

  • r (read)
  • w (write)
  • x (execute)

Operators:

  • + : Adds a permission.
  • - : Removes a permission.
  • = : Sets the specified permissions and removes any others.

If we had a script called do_backup.sh and we want to set the permissions for the owner to execute, the group to read, and deny others from any permissions, we'd run chmod u+x,g+r,o- do_backup.sh. You can add or remove permissions individually in this manner. You can also combine u, g, or o as needed if they will have identical permissions. I think this is handy for 'fine tuning' any permissions, but it is a bit (hehe) of a pain to type it all out in comparison to 3 numbers that can quickly be added up in your head.

Changing Ownership and Conclusion

In order to change the owner and group of a file (which you may need elevated permissions to do depending on existing permissions), I'll leave you to explore the chown and chgrp commands. They are pretty straightforward, but do offer more advanced options you can read about in the man pages.

And that's really the basics of assigning permissions. To explore more, I'd suggest reading the man pages on the following commands:

  • man chmod
  • man chown
  • man chgrp

Those really interested may want to go on to read about creating and managing groups.