Recent Questions - Unix & Linux Stack Exchange |
- How to store a nonconstant value in a certain moment in kernel modules
- redirect from right to left into code block
- Failed to start User Manager for UID 126 - Ubuntu 21.04
- Crackling sound on 3.5 jack whenever I had a few seconds without playing sounds
- supervise: logging all services to main process
- Trying to learn how web servers work [closed]
- Draw a rectangle with imagemagick
- less a file with JSON rows - how to highlight/colorize the rows?
- Libparted not found parrot os installation error
- Configuring the firewall with iptables
- ifdown: interface enp0s3 not configured. RTNETLINK answers: File exists. ifup: failed to bring up enp0s3
- How to move every file in a folder to a subdirectory of the same name?
- Why sudo apt install /path/*.deb produces permisson denied whereas sudo dpkg -i /path/*.deb works fine?
- print lines where each word contains two same characters in Linux
- How do I get faxes to a folder instead of having to print them with an HP printer?
- Kernel panic while install OpenBSD
- hard drive read throughput terrible after running badblocks, recoverable?
- Reformatting text using sed or awk
- Why two bridged veth cannot ping each other?
- ArchLinux "Failed to pair: org.bluez.Error.AlreadyExists"
- How to automatically detect and write to usb with variable spaces in its name
- Grub2 boot from USB3 PCIe card
- Bonding wired and wireless while using Network Manager
- Errno 5 Input/output error when running yum check-update
- Bluetoothctl: No default controller available, despite being unblocked
- using _< instead of < for stdin using bash
- Customize wingpanel under Elementary OS
- How to test whether a file uses CRLF or LF without modifying it?
How to store a nonconstant value in a certain moment in kernel modules Posted: 24 Oct 2021 09:31 AM PDT I wanna make a kernel module that displays the time past since the insertion of the module; and i'm gonna do that by subtracting values of Jiffies in the first moment and in the moment its /proc file is read. I tried to store jiffies in the very first moment through init function(which is called when the module is inserted). But I faced, 2 problems:
Here is a part of my code: I'll appreciate if anyone could help me with it. |
redirect from right to left into code block Posted: 24 Oct 2021 09:48 AM PDT Consider this scenario: this is an example of redirect from right to left, in which you process a file and redirect the result as input to However, attempt to redirect result of file processing to a code block in a similar fashion fails:
Or, if you try this:
How do you redirect output of some process to code block as input? |
Failed to start User Manager for UID 126 - Ubuntu 21.04 Posted: 24 Oct 2021 09:18 AM PDT It started to give an error when downloading files from the internet, it said something like: Does not have permission to save the file. now is given me this error: [FAILED] Failed to start User Manager for UID 126 Does anyone know what can be done? thanks in advance! |
Crackling sound on 3.5 jack whenever I had a few seconds without playing sounds Posted: 24 Oct 2021 09:10 AM PDT Symptoms Whenever I plug an audio jack into my PC a loud crackling can be heard in the headphones (tried 2 different pairs), it also happens whenever I play a sound if I didn't already have another audio playing in the last few seconds. It is as if an audio service or card were putting itself to sleep after a few dozen seconds of inactivity and resuming it would cause a single crackling noise then the audio is clean again. A similar but much less agressive sound is heard a few seconds after an audio is done playing. The crackling sound is much louder at its first instance (after boot) than any other time, it also happens whenever I plug in headphones or when the pc turns off. System I use a clean install of Parrot OS 5.0 (LTS) (debian based) on a stock HP ENVY PHOENIX 860-080nz 1.04(except for the storage), the issue was there from day one. Here is the output of cat /proc/asound/cards Devices 0 and 1 use the snd_hda_intel driver which is native to the kernel, I didn't touch this. Here is cropped output of lspci -v Other tests I did USB speakers work perfectly fine. This happens whether I am in headless mode or not (I suspected it might be KDE as the first crackling at boot comes during the KDE splash logo) I dual boot with windows and have no such issues on the Windows side so I'm certain it's no hardware issue. |
supervise: logging all services to main process Posted: 24 Oct 2021 07:53 AM PDT I am using It makes the configuration file unconveniently long and repetitive. Is there a way to specify this in a more compact manner, for all services at once? Better yet, is there an easy way to make all services log to the supervisor standard output, and additionally prepending each line with service name? |
Trying to learn how web servers work [closed] Posted: 24 Oct 2021 08:03 AM PDT I'm trying to go in depth on how web servers work how to configure them how to sercurely protect them etc I was just wondering if anyone could give me some good recources that I can learn from my prefernce is the hands on approach I'd like to actually get in there and actually do everything myself |
Draw a rectangle with imagemagick Posted: 24 Oct 2021 07:49 AM PDT How can I draw a simple rectangle. Docu adds a black point which I don't want. |
less a file with JSON rows - how to highlight/colorize the rows? Posted: 24 Oct 2021 09:34 AM PDT I have log files with json rows inside - less displays it as just plain text |
Libparted not found parrot os installation error Posted: 24 Oct 2021 06:40 AM PDT I have a usb with parrot os on it. I have used it previously to install parrot on a few devices. I have a laptop with a faulty hard drive (gives SMART error ). Tried to use it to install parrot on an external drive but the installer says "Libparted not found" and closes it self. Any help? |
Configuring the firewall with iptables Posted: 24 Oct 2021 08:56 AM PDT I have an instance of SSH running port 2233 and a Cowrie honeypot on port 2222. SSH needs to stay that way but Cowrie needs to be forwarded to port 22. Port 2222 (running Cowrie) shouldn't be visible from the outside world. Internal (local) traffic should run as it is. Every other incoming/outgoing traffic must be blocked. I have to configure it using iptables only. I've tried reading man pages for iptables & a bunch of blog posts for the last 2 days. I'm tired and would really appreciate any help... |
Posted: 24 Oct 2021 06:31 AM PDT I have a virtual box (6.1) with ubuntu minimal. in the settings of the virtual machine in the network section, "Bridged Adapter" is selected. I tried to add the string "enp0s3=enp0s3" to /run/network/ifstate but it doesn't work. But /run - it's a virtual file system and the string with enp0s3 will be delete after reload daemons or reboot the server. Some people say that all configured interfaces should be displayed in /run/network/ifstate. But why, then, the enp0s3 interface is not displayed in the /run/network/ifstate if it is registered in the config ? And may be I have some mistake in config file? after reboot, the address 192.168.88.236/24 rises, but these commands do not work: I don't understand why errors are coming out: Where ifup and ifdown can get the config to work with the interface except for the file /etc/network/interfaces? The file /etc/networks is empty. |
How to move every file in a folder to a subdirectory of the same name? Posted: 24 Oct 2021 09:26 AM PDT Say I have a bunch of files in a directory I then want to create subdirectories in the same directory of the same name as the files (filename but no ext) and move them in like this What would be the most efficient way to achieve this? Edit: ext1, ext2, ext3 are just to indicate three distinct filenames, like .foo, .bar, .top, .coffee etc. Not that the filenames are similar. |
Posted: 24 Oct 2021 07:01 AM PDT I was wondering for a long time why Recently I've tried I would use Is there any way to skip fetching part for P.S. I'm aware of other ways to install local debs, e.g. adding local repository or using non-preinstalled Added: permissions inc. ACL: apt / apt-get output: |
print lines where each word contains two same characters in Linux Posted: 24 Oct 2021 09:22 AM PDT I have input like this i am trying to print lines where each word contains at leats two same characters, useing grep expected output |
How do I get faxes to a folder instead of having to print them with an HP printer? Posted: 24 Oct 2021 09:31 AM PDT I've got an HP Color LaserJet Pro MFP M479fdn which is capable of receiving faxes and save them in a folder. Only when I look at the interface, it tells me I have to enter a "shared folder". Here is the concerned page: Is there a way to make this work with just standard Linux folders? Or is it necessary for me to setup Samba to get it working? I would prefer to avoid samba if at all possible. Update:As answered below, there isn't really another solution. The fact is that I already had samba installed so all I had to do is add one entry like so: create the user: and restart the service: Then I could use the following share folder in my HP settings: which was accepted. The next page asks for the user and password, I used "fax" and the password I entered when I ran I'm not 100% sure that it works at this point, I need to receive a fax... Part of this setup is based on the Ubuntu install and configure samba page. |
Kernel panic while install OpenBSD Posted: 24 Oct 2021 06:51 AM PDT Kernel panic while install OpenBSD.I tried installing the system but this is the error message that I have got: Steps I tried:
Thanks Jonathan Steadman. The helpful guide I followed: https://www.openbsdhandbook.com/installation/ |
hard drive read throughput terrible after running badblocks, recoverable? Posted: 24 Oct 2021 08:32 AM PDT I have a collection of new drives, a friend recommended I run badblocks on the new drives before using them. I ran badblocks on some of the new drives before imaging them For the drives that I ran badblocks on, read throughput after imaging is very low Did I "break" these drives by running bad blocks? Can I recover/reset them? Smart shows a
|
Reformatting text using sed or awk Posted: 24 Oct 2021 07:56 AM PDT I have a input like where first row is the header, is it possible to reformat the text as the output below? I tried above not working, I am a new beginner in Linux, any idea would be appreciated. input : Desired output |
Why two bridged veth cannot ping each other? Posted: 24 Oct 2021 09:30 AM PDT I need to set up a network environment where two veth interfaces is attached to one bridge and they need to be able to communicate with each other. So I execute the following commands in a clean ubuntu shell: The ping does not work. Could anyone help me on this? What should I do to make The output of the The purpose of this is to put those two Thank you! |
ArchLinux "Failed to pair: org.bluez.Error.AlreadyExists" Posted: 24 Oct 2021 07:07 AM PDT I attempted to connect to a device doing: Which gave me the error: I wasn't able to find any other issues online with this error. I then tried doing: which failed, and I got the same error. I also tried rebooting. If you need anything else specified, please ask. |
How to automatically detect and write to usb with variable spaces in its name Posted: 24 Oct 2021 10:02 AM PDT I am doing the second BASH exercise from TLDP Bash-Scripting Guide, and I have most of it figured out up until the part when it comes time to copy the compressed files to an inserted USB.
As I progress with the script it is becoming less ..elegant, and was wondering if there was a better way to do this. I know creating files is likely not the most efficient way to do the comparisons, but have not got the shell expansions figured yet, and intend to change those once I get it working. The problem specifically is, to ensure that the usb is mounted and that I am writing to the USB and nowhere else. I am comparing the last line of
To make this portable for USBs that may have different names is my best bet from here to do something with awk and field separators? And as a follow-up, I know this is pretty inelegant, and wonder if there is a cleaner way to go about this...especially because this is the second exercise and still in EASY. The output from the df tails is: The script so far |
Grub2 boot from USB3 PCIe card Posted: 24 Oct 2021 07:33 AM PDT I have grub2 installed on my PC's internal hard drive and I am trying to boot a debian installation on a USB key. The PC doesn't have any USB 3 ports so I have added a USB 3 PCIe card. I know that most PCIe USB3 cards don't have boot ROMs, so my plan was to load grub2 from the hard drive and then boot into the USB key. When the USB key is plugged into a USB 2 port everything works fine in the setup. When I try to instead plug into the USB3 port on the PCIe card, the following error appears:
After that grub goes into the rescue mode and ls only shows (hd0), (hd0,msdos1), and (hd0,msdos2). So it's as if grub can't "see" the usb key. I've added insmod for usb, usbms, xhci, echi, uhci to /boot/grub/grub.cfg . I know the USB 3 port works from linux because when I run from a distro on the hard drive I am able to mount from usb keys in the port. Is there any way to get grub2 to support the PCIe USB ports? |
Bonding wired and wireless while using Network Manager Posted: 24 Oct 2021 09:59 AM PDT I'm running Linux Mint 17.3 on my laptop. When docked, I'm connected via Ethernet, but when I undock, I'd like not to break my ssh sessions, ongoing downloads, etc., and to use the same IP address on the Wi-Fi adapter, so that still appears the same to other machines on my network. Bonding in mode 1, active backup, sounds exactly like what I want. I've found a number of resources online about how to set it up, but network configuration seems to vary quite a bit between distributions and even between different versions of each distribution, so that the steps for this vary quite a bit. What's more, most of the instructions I've found rely on static configuration, like hardcoding network addresses and even WPA passwords into /etc/network/interfaces. I take my laptop to other networks, so I rely on Network Manager to store network configuration. By googling "bond eth0 wlan0", I found a sample /etc/networking/interfaces file that more or less works, but I apparently have to disable Network Manager to keep it from doing weird things with my routing table. And while the bond is active, I can't seem to use the Network Manager applet to change Wi-Fi networks. Network Manager 0.9.8 supports bonded interfaces, but only for Ethernet and InfiniBand connections, not for Wi-Fi. Is there a way to bond Ethernet and Wi-Fi connections that's compatible with Network Manager? |
Errno 5 Input/output error when running yum check-update Posted: 24 Oct 2021 08:02 AM PDT I tried to update a server over SSH, but when I ran
I think this means the RPM libraries may be damaged or corrupt, but I'm not sure how to resolve this. |
Bluetoothctl: No default controller available, despite being unblocked Posted: 24 Oct 2021 07:08 AM PDT I'm having issues connecting my Logitech K810 Bluetooth keyboard in Debian Jessie with BlueZ version 5.23-1, kernel 3.16.0-4. The keyboard works fine most of the time but sometimes it doesn't work at all and When this occurs, hciconfig still recognizes the device and I get this output: But no devices are shown in the Rebooting or sometimes suspending/resuming fixes the issue: Bluetooth is consistently hard and soft unblocked according to The relevant output from I didn't have this problem with the same hardware in Debian Wheezy. What could it be the bluetooth controller to be unavailable at times? |
using _< instead of < for stdin using bash Posted: 24 Oct 2021 09:50 AM PDT What is the difference between using Example: |
Customize wingpanel under Elementary OS Posted: 24 Oct 2021 09:04 AM PDT Recently I have installed Elementary OS luna, which is based on Ubuntu. I want to customize the wingpanel to display the menu toolbar of the selected application. This is my wingpanel: But I need it to look like this: The File, Edit, Selection and other menus, and the Close, maximize and minimize icons are on the wingpanel. |
How to test whether a file uses CRLF or LF without modifying it? Posted: 24 Oct 2021 09:57 AM PDT I need to periodically run a command that ensures that some text files are kept in Linux mode. Unfortunately The script I write is in Bash, so I'd prefer answers based on Bash. |
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 |
E-Techbytes: Recent Questions - Unix And Linux Stack Exchange >>>>> Download Now
ReplyDelete>>>>> Download Full
E-Techbytes: Recent Questions - Unix And Linux Stack Exchange >>>>> Download LINK
>>>>> Download Now
E-Techbytes: Recent Questions - Unix And Linux Stack Exchange >>>>> Download Full
>>>>> Download LINK T1