Recent Questions - Unix & Linux Stack Exchange |
- How to get the current local networks public facing IP address while connected to a vpn, using the terminal?
- Marking multiple lines in ed
- Can not install any linux distros
- Can you expand (execute) function inline with bash to use the result for another command's argument?
- I can't install cgpt in Arch Linux using Pacman, what to do?
- Ubuntu 20.04 will not boot on Dell Inspiron 3891
- Wi-Fi isn't working on HP 15s-eq2055
- Reading in shell scripting without waiting to hit enter
- How to permanently allow use of port 81?
- Mount a detected but not listed in disks list SD card
- MBR converted to GPT based system, how to boot Linux and Windows
- Deja-dup/Duplicity GPG error
- How to listen the requests sent to a unix socket
- Linux showkey utility inside a bash script not returning data
- Align numeric values to the right (recfmt output)
- OpenJFX instead OpenJDK
- How to make a link to have the same timestamp as the target file
- Two keyboard keys are reporting the same scancode
- iptables not allowing and tcpdump is not reporting traffic from IP
- Potential Reach of Windows Malware via Wine and Mono
- How to split a partition into two without formatting?
- Organizing a CSV file with missing columns
- How to add a DER public key to the system keyring to load a signed kernel module on next boot
- Distribution-agnostic package search and installation
- How Can I Disable the Global Shortcut CTRL + SHIFT + U in Linux Mint?
- Creating .deb with systemd service but without SysV init scripts
- what(): locale::facet::_S_create_c_locale name not valid
- wget - how to reject string from downloading html pages
- Centos 7 - Can't download RPM (Trying to connect with IPV6)
- How to convert grub config to use kernel device names instead of UUID
Posted: 04 Sep 2021 10:15 AM PDT Is there a command or file in Linux from which I can retrieve the currently connected networks public facing IP address while I am connected to a vpn? Reason I ask is because I would like for |
Posted: 04 Sep 2021 10:08 AM PDT I've opened ed and inserted the following text: However, when I attempt to mark lines 1-3 using the following command: And print them with It only prints the last occurence. Is there a way I can mark all three line (i.e. |
Can not install any linux distros Posted: 04 Sep 2021 09:47 AM PDT I can not install any linux distros on my old pc despite having easily install 2 times on my Win 10 PC. I am using Win XP 32 bit 2.82GHz Dual Core CPU, 1.99GB RAM. I have tried many instructions, watching countless videos, reading answers from forums for a month and still doesn't work it keeps going from problem to problem: rufus and etcher doesnt support, burn device not found on CDBurner XP, I also use Linux Live USB Creator but after a while it seems to work just like instructed and then nothing happen :(( I dont know what to do. Plan to throw my computer :< Btw, sorry for my English |
Can you expand (execute) function inline with bash to use the result for another command's argument? Posted: 04 Sep 2021 09:46 AM PDT I'm making some simple logging tools to use for work and i have a niche problem that i'm trying to solve when typing commands in a shell. I want to, as smoothly as possible, use a function's result for the argument of another command, all while keeping it inline. For example: I want to expand, or rather execute, my-function while writing some-command. The double tab is just to get the use across, that's what i mean by "inline" but i might be misusing that term. I don't want to split the command, i.e. execute my-function, store the variable or use the stdout, and then type some-command. The functions print meta data basically such as project name, timestamps etc. I will use them to name and store the output from various commands and tools. These are the ways i've found so far that works:
These two can then either be used as is (in which case i cannot check them first) or i can use the shortcut
I don't want to expand all aliases as some of them can be long and unnecessary which will clutter the prompt. Question: Is there a way to expand, such as with Thanks! |
I can't install cgpt in Arch Linux using Pacman, what to do? Posted: 04 Sep 2021 09:45 AM PDT I've been unable to install cgpt in Arch linux. I don't know what it is, but it's a dependency. Here is the output of my Terminal: How to get pacman to work? Searching |
Ubuntu 20.04 will not boot on Dell Inspiron 3891 Posted: 04 Sep 2021 10:17 AM PDT I have failed at installing Ubuntu. I don't know where I went wrong. I'm not very experienced in Linux and I'm sure I've made a simple mistake. Here's the situation. When I power up the computer, I see the Dell logo and then nothing. The screen is clearly backlit, but it is black. Nothing further happens. When I power up the computer and hold down Shift, I get the same result. When I power up the computer and tap F12, I can get to the BIOS (version 1.0.14). I can choose my boot order. I can point towards the drive with Ubuntu on it. I even have a selection called Ubuntu. It doesn't matter which of these I choose, the result is the same. There are no other operating systems installed on this computer. The OS I did attempt to install was Ubuntu 20.04 LTS. It was working a few days ago, but then I tried to update the firmware to 1.0.14. It said it was successful, but then I ran into this problem. If I put in the boot flash drive and choose it as a boot option, I will get apparent success. The installation GUI shows up. It says it works. I get the message that Installation is complete and that I should reboot. When it tells me to take the boot drive out, I do so. The machine is a Dell Inspiron 3891 Intel Core i5-11400. Brand new, straight out of the box. I have made no changes to the insides of this machine. I tried installing Ubuntu to the 256 GB SSD. I tried installing to the 1TB HDD. Same result. About two days into this troubleshooting process, I lost my temper and starting reformatting everything. In retrospect, maybe this was not the best move. I tried booting off the boot flash drive and running boot-repair. If I power the machine while tapping Esc, I do get GNU GRUB version 2.04. However, nothing seems to work from here. I found instructions that said I should type C at this point, but I got error: can't find command 'C'. I've run the Dell SupportAssist On-Board Diagnostics. It says all tests passed successfully. Yesterday I found an Ubuntu website that displays all the "Ubuntu certified hardware". It lists the Dell Inspiron Core i7 and the Core i9, but it does not list the Core i5-11400. I would give up at this point, but I did see it work at least once. My initial attempt worked great. I only ran into trouble when I tried to update the firmware. I KNOW this system can run this OS. I tried downgrading the BIOS to 1.0.13. This did not help. I tried downgrading to BIOS 1.0.12 and I got an error that this downgrade was not supported. I verified in the BIOS setup that BIOS downgrade is allowed, but it won't allow this. I don't know what BIOS was active when I first bought the machine, I didn't think to look. I originally burned the flash drive with ubuntu-20.04.2.0-desktop-amd64.iso with balenaEtcher using the default settings. I then tried the same ISO but using Rufus 3.13.1730, and burning the image as a dd. Its interesting that I get a little farther witih this. I can install the OS and then it will boot to the text screen that lets me choose Ubuntu, but then it dies immediately afterwards. It dies in the same fashion - backlight is on and slightly flickering, otherwise featureless black screen. Last night I noticed that Ubuntu now has 20.04.3. I tried downloading that ISO and burning it to my flash drive as a dd using my Rufus software. This flash drive won't even allow me to install. I can get into the BIOS and choose the flash drive as the boot medium, but when it tries to boot from the flash drive I get the same freeze. Dell logo nice and clear, then freeze on a backlit black screen. I did verify the checksum for this iso. There's no urgency to this question. I am taking a Linux class, but this problem has nothing to do with that class. I'm doing this for the learning experience. Well, that's not exactly true. I started this project for the learning experience. Now I'm refusing to give up out of sheer stubbornness. I'm lost. I don't know where to go from here. Can anyone offer advice please? Updated to add: I tried removing the CMOS battery to set the nvram back to factory defaults. I don't think it worked. When I powered the machine back on. I did get an error that the time was not set. However, the BIOS still had SATA set to AHCI and SecureBoot was still off. I am positive that when I first got this machine, SATA was set to RAID and SecureBoot was on. |
Wi-Fi isn't working on HP 15s-eq2055 Posted: 04 Sep 2021 09:30 AM PDT I installed Manjaro Linux GNOME version on my laptop and everything is okay except the wifi settings. Manjaro tells me that I don't have a Wi-Fi adapter. I didn't find any drivers for that problem on HP`s site. |
Reading in shell scripting without waiting to hit enter Posted: 04 Sep 2021 10:25 AM PDT I'm working on a small bash script, and it essentially will just do two things. Execute two update commands together, and list keybinds. In the same way, for example, Edit; I forgot to mention this, but it honestly doesn't matter if the variable has a hyphen in it. What I mean by the title of the post is, how do I use the This works perfectly fine when I input |
How to permanently allow use of port 81? Posted: 04 Sep 2021 08:48 AM PDT I am using a VPS on nginx ubuntu and I am hosting two different files on default port (80) and the port 81. The problem is that I ALWAYS have to run this command below before making the port 81 useable So if the VPS reboot I would no be able to access the server that is hosted on 81. If someone could help me with that, thank you :) |
Mount a detected but not listed in disks list SD card Posted: 04 Sep 2021 07:25 AM PDT My problem is a bit complicated to describe knowing that I'm not really a passionate about partitioning, but here's what I'm trying to do, What I tried and what doesn't work : GoalMy goal is to simply mount and reset my micro-sd card. It putted it in a micro-sd to sd adapater (female micro-sd/male sd) in order to access it from my laptop. It's not an OS problem, as I have similar problems on my other PC with this micro-sd card, and it's not the adapter, I have tried with a micro-sd to usb-A adapter. What I tried and doesn't work (and why)Linux (Fedora)GUI-based programsGNOME File ExplorerMy SD card isn't listed. GNOME disk softwareIn the disk selection, my micro-sd card appears. I can select it, and formatting operation are visibles. But when I try to format it, the following error is displayed : GpartedWhen launching gparted, I can see that informations about my sd card are loaded (and are surprisingly long) in the footer, but it just doesn't appears in the disk list at all. Raspberry Pi ImagerI know this isn't the best solution, but I tried to install raspbian using the raspberry pi imager, just to see. The SD card is listed, and I can click on the install button. the loading starts and progresses without problems, but when it reaches 99%, the following error is displayed : CLI-based programsfdiskWhen I run Windows 10 (not really relevant here but maybe it can help you to understand where the problem is)GUI-based programsFile Explorermy SD card isn't listed. Disk Managerif my SD card is connected, the loading is infinite and the program does not respond. Peripherals and printers/peripherals manager (configuration pannel)my SD card is listed, but I can't do anything on it. In the peripherals manager, when I go in the properties on my card, then go to 'details' it crashes. when I go to 'Volumes' and try to 'populate', it crashes. In Peripherals and printers, it crashes when I try to display the properties. third-party softwares (like EASEUS partition manager)my SD card isn't listed Raspberry Pi ImagerMy SD card isn't listed, or it's listed for some obscure reason, and when I try to install raspbian, the load remains stuck at CLI-based programsdiskpart, get-volume, ...if my SD card is connected, the loading is infinite. fsutils, get-psdrive, ...my Sd card isn't listed. AndroidI tried to put my sd card on an android smartphone, then go to storage, and then reset it. It aborted and displayed the following toast notification : Apparition of the problemI simply tried to reset my SD card using the dedicated tool in the raspberry pi imager (windows). It kept getting stuck at the first step, something like "preparing to reset", so I clicked cancel after a while, the cancel succeded without any problem. That's all. The SD card didn't have any problem or something. ConclusionAs you can see, I tried a lot of different things. My SD card is detected, but I can do nothing on it at all. I really have no idea where the problem is, and how to repair it. Thanks in advance for your help. |
MBR converted to GPT based system, how to boot Linux and Windows Posted: 04 Sep 2021 07:04 AM PDT How to boot GPT based system to Linux and Windows? This is not a question of starting from a fresh GPT based system, but starting from a MBR converted to GPT based system. My Asus laptop initial setup,
However, I found that my USB is booted only in EFI style, and Windows 10 is refusing to be installed to my BIOS/MBR/CSM mode system when my USB is booted in EFI style. So I converted my MBR disk to GPT, and of course, as Krunal warned, such practice ruined my system boot, and I need make everything bootable again. Alright, so now is my question.
So I basically don't know which way to go, and don't want to further mess up with my already-messed-up and unbootable system. So clear instructions on how to boot Linux (and Windows) from such environment is really appreciated. Thanks. |
Posted: 04 Sep 2021 06:53 AM PDT Preparing for a distro change, I made a backup using deja-dup, and verified I could access de backed up files. After installing a new distro alongside the original one, I still could access and restore them. However, after I wiped my computer and did a fresh install, an error started appearing after trying to restore the files. This message appears on either deja-dup or duplicity CLI. The output of I've looked around everywhere but found no solution to my problem. Can anyone help me recover my files? PS: I also have a copy of the backup stored on Google Drive, but deja-dup can't "see" it, when it searches for the files it just creates an empty folder with the same name as the one I entered and finds no files. |
How to listen the requests sent to a unix socket Posted: 04 Sep 2021 06:44 AM PDT I'm learning docker and wanted to see the API commands sent by the client to the docker server/engine. I know that the communication between the two processes happens via |
Linux showkey utility inside a bash script not returning data Posted: 04 Sep 2021 07:39 AM PDT I am bit puzzled, when I run this showkey -a command on shell, the command is run and I can interact with it in realtime. See below Now when I add this command in a shell script, I do not see any output, or in other words I cannot interact with script or command that is run inside the script. Here is my bash script. When I run this script, it waits for 10 seconds and exit to the shell. How can I make it show keys pressed, codes and interact with the user. The reason I want this because the script has to execute many tasks before coming to keyboard testing and after keyboard test there are various other tasks that the scripts performs. I couldn't find any answers anywhere, so as a last resort I had to ask this question here. I hope someone can help. |
Align numeric values to the right (recfmt output) Posted: 04 Sep 2021 06:40 AM PDT I'm making a Unix database in a plain text with GNU Recutils. With the following script I get a books list of a selected category: The output is the following: The file It seems it's impossible to define the alignment to the right side from this file, according to the manual. So I try to find a Unix solution, probably using The desired output: |
Posted: 04 Sep 2021 06:05 AM PDT System: Debian 11, 5.10.0-8-amd64 I have installed OpenJFX package in purpose to use it instead of OpenJDK. Typing "java --version": I would like to use openjfx but how to replace it? OpenJFX is localisated in /usr/share/openjfx/lib. Thanks you. |
How to make a link to have the same timestamp as the target file Posted: 04 Sep 2021 10:13 AM PDT Suppose you have file So is there a way to create a symlink such that it has the same The background to this question is this script, where a directory of links to the n newest files of a cloud mirror is created. Now if I do for example Edit In my original post I erroneously asked for ctime (I changed it above), however the question should be about mtime. Thanks to @ilkkachu indicating this. |
Two keyboard keys are reporting the same scancode Posted: 04 Sep 2021 08:15 AM PDT I have an HP 15-da1071ne, I'm trying to remap the brightness up/down keys. The issue is that these two keys report the same scancode: Edit: I am running Pop OS 21.04, kernel 5.11. I used showkey --scancodes to get these codes, also evtest reports same output for these 2 keys. Is there a solution for this issue or only a complaint to HP? |
iptables not allowing and tcpdump is not reporting traffic from IP Posted: 04 Sep 2021 09:33 AM PDT I constructed a very simple set of iptables rules that block all traffic except from a single IP address: When iptables is stopped I can SSH into the server and I can see the connection attempt using tcpdump. When iptables is started, I get a "Could not connect to server" error. Most confusingly, I don't see my connection attempts anymore with tcpdump. Can anyone give me some insight into what could be causing this? Thanks. |
Potential Reach of Windows Malware via Wine and Mono Posted: 04 Sep 2021 07:47 AM PDT Scenario: I have a desktop Ubuntu 21.04 system with Wine and Mono installed. The only program I run on Wine is VisiPics, a Windows photo comparison tool. VisiPics needs read-write access to the external drive on which those photo files are stored, so as to delete unwanted duplicates. My question is, to what extent do Wine and/or Mono pose security risks in that scenario? Certain comments contribute to my confusion:
To repeat, my question is, to what extent do Wine and/or Mono pose security risks in the stated scenario? |
How to split a partition into two without formatting? Posted: 04 Sep 2021 08:18 AM PDT There is only one partition in my SSD currently. That is where the Linux code lies. I am using ubuntu distro. Can I split this partition into two without formatting? If yes, how? |
Organizing a CSV file with missing columns Posted: 04 Sep 2021 10:29 AM PDT I have a .csv file that was not filled in properly, which has missing column information. The file looks something like this (whitespace is for clarity): Where Where now There is any number of null spaces after the data. The data is laid out so that each row is in order [ There are no other patterns to this data. I would like to reorganize this data into the appropriate column as: or in the example as I cannot go back to where the information was gathered, it's older supercomputer simulation results. Edit and AttemptThanks to FKEinternet I made some progress. Here is the bash script I have tried with a mock file. I made a file containing the column headers: all on separate lines in headers.txt. And I made another mock file called datafile.txt. Running the bash script I get: which are correctly positioned but only the first entry in each row. I can't figure out why it isn't working. |
How to add a DER public key to the system keyring to load a signed kernel module on next boot Posted: 04 Sep 2021 07:40 AM PDT Bumping this question to 2021. SecuredLight is a VM running RHEL 8.4 running on top of a R710 bare metal machine running RHEL 8.4, Royal. Following Red Hat guide, section 4.5 I have a signed kernel module built from the script and spec file. The module has a digital signature and other parts such as Author. From userland I can With the kernel module signed and built in to an rpm, using Here's what I see on the command line within the VM: From my initial command line history I have done this with a requisite reboot: 10 keyctl list %:.builtin_trusted_keys Printing the platform and builtin_trusted_keys I see this After running the mokutil --import and rebooting, there's no option to "enroll MOK" presented. Here are results from The MokAuth and MokNew efivars are present above the BootOrder var. It's a bit lost to share the Full stuff is here: On Royal (the bare metal machine), this in the /etc/libvirt/qemu.conf This is the output from the efibootmgr I have enabled the OVMF entries and the VMs in the cockpit disappear. I have to disabled them, systemctl restart libvirtd possibly reboot to reinitialize the socket and the VMs return. How do I successfully enroll a kernel module in to the keyring? I enter the password twice and reboot but there's no option to add a third password to make it permanent. Does the BIOS boot of Royal impact the UEFI SecuredLight options or are options lack from the cockpit TianoCore UEFI? On Royal within the cockpit, |
Distribution-agnostic package search and installation Posted: 04 Sep 2021 08:48 AM PDT I'm trying to figure out a distribution-agnostic way to install packages providing specific executables or files. I know that it is impossible to get this perfect, but I think I have something that is almost good enough and I was hoping that maybe someone has an idea on how to improve upon it. Basically I've written a script that provides an abstraction layer around the most common package managers: The functions it creates can be used like this: This basically works fine on Fedora, RHEL, Debian, Arch, Gentoo, OpenSuse (and many more I would think). But it does not work on Ubuntu for example because Ubuntu doesn't have the required What I have considered is maybe adding a Any ideas? |
How Can I Disable the Global Shortcut CTRL + SHIFT + U in Linux Mint? Posted: 04 Sep 2021 07:16 AM PDT Backstory: some Linux distributions setup a keyboard shortcut to let you enter Unicode characters, and they use Everything I've found (eg. in this question about re-enabling that shortcut: How to re-enable the Ctrl+Shift+U shortcut in Cinnamon Mint 17.3?) suggests that it's dependent on my IME (input method editor). But when I went to "Input Method" (in the system menu), it said I didn't have an IME selected. I then tried switching to the Fcitx IME (since I would like to be able to type Japanese characters), but that didn't help. Also, I went through all of the Fcitx configuration, and couldn't find any mention of a My question is: how can I disable this global |
Creating .deb with systemd service but without SysV init scripts Posted: 04 Sep 2021 06:02 AM PDT I'm trying to add a systemd service file to an existing Debian package. I followed https://wiki.debian.org/Teams/pkg-systemd/Packaging, so I created
Now when I rebuild the package with It seems like the build script expects an init.d script if there is a Is this expected behavior? Should I always include SysV init scripts when I include a My system is Debian Jessie. |
what(): locale::facet::_S_create_c_locale name not valid Posted: 04 Sep 2021 09:00 AM PDT I have a Kali Linux where I cannot install any packages. |
wget - how to reject string from downloading html pages Posted: 04 Sep 2021 10:02 AM PDT I am using the following wget command and it downloads the required files I need except for one thing... I want to download files like these: But I don't want to download files like these: I cannot seem to figure out how to reject downloading the html pages containing the extra stuff at the end. The main problem is that wget gets stuck retrying and times out on the second types of links because the don't go anywhere - and then wget client gets banned. Any suggestions? |
Centos 7 - Can't download RPM (Trying to connect with IPV6) Posted: 04 Sep 2021 07:03 AM PDT I am normally an Debian/Ubuntu guy, but I wanted to test the foreman on CentOS 7, but I am having some trouble with the But nothing seems to work? |
How to convert grub config to use kernel device names instead of UUID Posted: 04 Sep 2021 08:01 AM PDT I've got a bunch of identical systems on which I want to clone the same openSUSE 12.3 installation. I've set up clonezilla on PXE server. After appling the disk-image of on another machine, it fails to boot. This is because all the partitions are referred to be their UUIDs instead of the kernel-assigned name (sda1, sda2, etc). How do I configure grub to be using the kernel names instead of the UUID so that the image can be truly ported to the other systems? I have tried setting After these changes, the system still boots fine on the source machine, but doesn't boot on all the others. Grub loads, but only shows the word "GRUB" and thats all. Nothing else happens. My current |
You are subscribed to email updates from Recent Questions - Unix & Linux Stack Exchange. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment