Linux - Reddit – Telegram
Linux - Reddit
773 subscribers
4.19K photos
207 videos
39.9K links
Stay up-to-date with everything Linux!
Content directly fetched from the subreddit just for you.

Powered by : @r_channels
Download Telegram
Can anyone point me to see good video resources for learning SED and AWK?

I've realized I need to up my game. Anyone have some good resources?

https://redd.it/ct7bc1
@r_linux
[Tutorial for beginners] GnuPG: how to export, import, delete and revoke your keys

Hello, friends!

​

In my first [post](https://www.reddit.com/r/linux/comments/creb29/tutorial_for_beginners_how_to_install_and_use/), I taught you how to install, create and use GnuPG keys on GNU/Linux. Now, this tutorial is a reference to export, import, delete and revoke any GPG key. This is very useful when you work as system administrator and employees working in your company need to have their keys saved in the servers.

For this tutorial, I'm going to use the parameter `--armour` (you can use it without letter 'u'). But, why? Some times, you need a readable file (file in text format, similar to .TXT, or any other plain text format) for a specific situation, for example, include your public key in your GitHub account. It's up to you if you want to use or not the *armour* parameter.

Let's start!

Open a terminal and list your keys:

$ gpg --list-keys

https://i.redd.it/76pz3v7vloh31.png

Did you get a return? Are your keys listed?

If no, please read my [first post](https://www.reddit.com/r/linux/comments/creb29/tutorial_for_beginners_how_to_install_and_use/).

If yes, here is the first step: export your keys (public and private) and create your revocation certificate.

Maybe, you are asking to yourself: what is this revocation certificate?

In the worst case scenario, someone discovered your GnuPG password and, somehow, got your keys. Unhappily, they are compromised. A revocation certificate makes your keys become useless.

There's one thing I'd like to let you know: once you try to export any key (and revocation certificate), the default output is redirected to the screen, but we need to save it into a file. The parameter `--output` is used to redirect this output from your screen to a file. There's another way you can redirect it: with `> filename`, for example: `gpg --export` `john.doe@email.com` `> public.key`. With this in mind, type the commands bellow:

$ gpg --armour --output public-key.asc --export john.doe@email.com
$ gpg --armour --output private-key.asc --export-secret-keys john.doe@email.com
# Type your GnuPG password
$ gpg --armour --output revoke.asc --generate-revocation john.doe@email.com
# This command is going to ask you about the reason why you're creating a revocation certificate.
# Select the option, press ENTER and write an optional denoscription.
# Later, confirm with 'y'.
# Type your GnuPG password

https://i.redd.it/6p2hassmmoh31.png

Now, you can send your public key to someone you trust. And keep your keys and certificate save in an external hard drive. Just send (and use) your revocation certificate once your keys are compromised. Otherwise, keep it with you.

To see how the revoke process works, you can do this:

* List your keys with `gpg --list-keys`.
* You can see lines starting with 'pub', 'uid' and 'sub'.
* In the line 'uid', it mentions the trust of this key, like *\[ultimate\]*, and your personal denoscription (full name, comment and email).
* Type:
* $ gpg --import revoke.asc
* The output in your screen is informing you that it was processed with success.
* Now, list again you keys. The 'sub' line disappeared and the 'uid' line is informing you that your key is *\[revoked\]* (check it with `gpg --list-keys`).

https://i.redd.it/klw5qd00noh31.png

Once it's done, delete your GPG key with the command bellow:

$ gpg --delete-secret-and-public-keys john.doe@email.com

GnuPG is going to ask you (with 'yes-no' prompt) to continue. Confirm all questions that are prompted to you.

https://i.redd.it/j65msulcnoh31.png

After that, you can try list again (`gpg --list-keys`) and you're going to see two lines which say:

>***gpg: checking the trustdb***
>
>***gpg: no ultimately trusted keys found***

These lines above mean that your system doesn't have any key, because you deleted them.

Now, the last step: how to import any GnuPG key to your system.

Type in your terminal:

$ gpg --import public-key.asc
$ gpg --import --allow-secret-key-impor
t private-key.asc
# Type your GnuPG password

https://i.redd.it/0f4sd30nnoh31.png

Once your keys were imported, you need to edit and trust them.

$ gpg --edit-key john.doe@email.com
# Type 'trust' (without quotes)
# Select an option depending on how much do you trust this key you're importing
# Confirm with 'y'
# Then type quit

https://i.redd.it/eyvly4wrqoh31.png

With these commands, you learned the basics about import (and trust keys), export, revoke and delete GPG keys.

If you have any question about this tutorial, just ask me here in the comments.

​

Thank you!

https://redd.it/ct7yjr
@r_linux
Introduction & Desktop

Hello. My name is Roy, I'm 17, and I fully switched to Linux a month ago.


I've been using Linux on older laptops for years, as well as embedded systems like the Raspberry Pi. I finally made the switch when Windows decided to crap out on me again. I got tired of the broken updates.

​

In the past I've used Ubuntu & Derivatives, Debian, Fedora, vanilla Arch, and I've also dabbled in LFS.


In order to make the full switch easier I defaulted to Linux Mint. I am happy to say, though, I have done some customizing in my desktop. See the attached images for the desktop & system info.


[My desktop](https://i.redd.it/3k5j9w5wxoh31.png)

[Desktop with Neofetch info](https://i.redd.it/aurbnyk5yoh31.png)

https://redd.it/ct8hwj
@r_linux
Dual Boot of Linux Mint Cinnamon 19.2 and Windows 10 on Lenovo Yoga 730 - First Impressions

Linux Mint 19.2 is brand new. The Yoga 730 is a modern laptop with a touchscreen that flips completely backwards so it can be used as a tablet. It was on sale at Best Buy last week with an I5-8265U processor, 12 GB RAM and a 256GB hard drive for $550 if you were a student or a parent of a student. I picked one up and wanted to detail my experience in case someone picked it up or is thinking about getting one.

For starters, I did not stick with the 256GB SSD. I replaced it with an Addlink S70 1TB PCIE NVME M.2 card I got from Amazon for $124. So, the first thing I did when I got the laptop was to install all Windows updates and flash the BIOS. Then, I selected to create a recovery drive. After the recovery drive was finished, I turned off the computer, turned it over, removed the 10 screws in the back and gently pried off the cover. On the right side (if the battery is on the bottom), you will see the battery plug on the motherboard. Unplug it. Remove the M.2 card, replace it with your new one, plug the battery back in and replace the cover. Start up the computer with the USB plugged in and it will allow you to recover your windows installation onto the new blank SSD.

After that, everything about the laptop was working in Windows 10. Windows and the BIOS were updated. I went into partition disks and shrunk the Windows 10 partition to half its size. I put linux mint on a USB stick and tried to enter bios. Everything I read online said you have to press F2 or function F2. I tried like 10 times and it would not work. You can press the novo button on the side to automatically start into BIOS, but I went through windows 10: recovery, advanced boot, etc. and entered BIOS that way. I checked and nothing in BIOS appeared to need changing. Everything was set up to allow for installation of Linux Mint, so I did the advanced boot again from Windows and selected to boot from USB.

I went through the normal settings, but when it came time to configure I selected "something else" just to be on the safe side. It didn't need me to select the EFI partition. But, I created a partition for / out of the free space. (Linux Mint uses a swap file instead of a swap partition automatically unless you explicitly provide a swap partition.) I installed.

The installation went perfectly. Mint was able to boot and so was Windows. The BIOS boot screen doesn't even come up unless you select Windows in Grub. This means grub comes up VERY fast on boot. Wifi and everything else worked out of the box except for the fingerprint reader (which will not work in linux and is a pain to register fingerprints in Windows). However, flipping it into tablet mode, or making a tent with it...those things did not work.

In general settings, there is a setting to disable automatic screen rotation. IT IS SET. You have to uncheck that setting to get screen rotation working. However, this still will do nothing. You have to use the following command:

sudo apt install iio-sensor-proxy inotify-tools

THEN display rotation will work pretty flawlessly, BUT the touchscreen does not rotate along with the display. So, if you flip the screen 180 degrees and touch the bottom of the display, it registers as a touch to the top of the display. To fix this [I found this little noscript from bartv](https://forums.linuxmint.com/viewtopic.php?t=239800) and saved it as rotate.sh and chmod'd it to execute. I put it in my startup programs in linux mint. However, it does not work as written. Type xrandr in a terminal and look at the output. If you have the Yoga 730, you need to change the line:

xrandr --output eDP1 --rotate normal

to

xrandr --output eDP-1 --rotate normal

and change every line that starts off "xinput set-prop 11" to "xinput set-prop 12". Then, whenever you boot, it will start that noscript and will rotate your touchscreen along with the display.

Everything but the fingerprint reader appears to work in linux. I even tried my Lenovo Active Pen (the original, not the 2) and it worked
out of the box. I sat and drew in Krita for an hour in tablet portrait mode and had no problems. When you're using the pen, it even automatically stops counting your finger touches as input...just like Windows does.

Wifi works around the house and did not drop out even once in an hour of use. All in all, this seems like a good 2 in 1 for linux.

https://redd.it/ctaw8y
@r_linux
Weekly Questions and Hardware Thread - August 21, 2019

Welcome to r/linux! If you're new to Linux or trying to get started this thread is for you. Get help here or as always, check out r/linuxquestions or r/linux4noobs

This megathread is for all your question needs. As we don't allow questions on r/linux outside of this megathread, please consider using r/linuxquestions or r/linux4noobs for the best solution to your problem.

Ask your hardware requests here too or try r/linuxhardware!

https://redd.it/ctbldr
@r_linux
Which is your favorite Linux Desktop and why ?

**1)** Which is your favorite Linux Desktop and why ?

**2)** Do you love or hate systemd and do you feel the controversy is over now ? do you miss the old day or you prefer it now ?

**3)** What you run at your job Centos/RedHat or Ubuntu or something else ? Which you prefer or feel is more powerful / stable ?

**4)** Can you do all the same advanced things in AWS with Linux than you can with Azure in term of features set, programming, iso image etc etc ?

**5)** What's the best Alternative in the Linux world to a Office 365 cloud setup ?

https://redd.it/ctcn5v
@r_linux
Coreutils: about exitcodes and changelogs

Somewhere between 2006 and 2017 they changed the exit codes for `ls` and I'ld like to see when. Just out of curiosity.

Here's an example, I've got these 2 servers:

|Server|OS|Coreutils version|
|:-|:-|:-|
|Server-1|Red Hat 4 (2006)|5.2.1|
|Server-2|CentOS 7 (2017)|8.22|

If I try to `ls nonExistantFile` on Server-1, the exit code is 1, if I try it on Server-2, the exit code is 2.

I had to do a lot of debugging in shitty code to fix that behaviour and now I'm curious: **Is there any way to see a complete changelog in the coreutils?**

https://redd.it/ct12dn
@r_linux
I ported my free Windows app to Linux, looking for feedback

I have a little GUI tool that adjusts pixel brightness based on screen contents. I made it to reduce eye strain when tabbing back and forth between dark IDEs and Firefox at night. (It also has basic temperature control, which I had to do because unfortunately it conflicts with Redshift).

It was originally for Windows, but I've gotten fed up with that, so here we are.

I'm fairly new to Linux in general, so I'm looking for feedback on whether there's any major issues. (Actually, it'd be great to know if you can get it to work at all). Source code and instructions are here: [https://github.com/Fushko/gammy](https://github.com/Fushko/gammy). Thanks in advance!

P.S. Apologize if this isn't the right place to post this. No idea where else to put it.

https://redd.it/ctgopf
@r_linux
What has been your biggest screwup and what have you done to prevent it in the future?

I am sure we all have had a bad day at least once when using Linux. I use Linux for around 20 years now. My biggest screwup was that I was installing a new machine and at the same time I placed the backup hardware in the old machine. I mixed up the machines and deleted not only the data on the main machine, but also on the backup machine.

I needed to reburn 200+CDs and 250+ DVDs. I lost also all of my other data, like emails going back for 15 or so years.

I did learn that having lost the emails is not an issue. The data you absolutely need can be gotten from elsewhere. I now just keep an absolute minumum in data.

For the backups, I now have not only backups but also backups of the backups. For the movies, and music, those are copies. The "real" data is incremntal copies. Only done by pull. The backup of the backup is turned off most of the time. Only comes onine when it does the backup. That is for around 5 minures per day.

I have also learned to work on only one machine at a time. Only when that one works for a week will I go to the next machine. But at that day I felt like a complete idiot. Most likely because I was a complete idiot.

So how did you break things and what did you to solve and/or prevent it?
This might show new users that making mistakes is ok.

https://redd.it/csxdzh
@r_linux
Unable to Install Windows 7

Recently I Installed Linux Mint on my laptop and removed windows 7. Now I want to install windows 7 back but my BIOS is replaced by GRUB and it does not detect my bootable USB so that I can install Windows 7. How do I solve this issue. I urgently need windows 7 as I need to run some accounting software and those are not available on linux mint. Please Help me?

https://redd.it/ctiop8
@r_linux