Questions tagged [linux]

These questions are about Linux in general -- NOT specific to a particular distribution. If the question just happens to be in a Linux environment, please specify your Linux distribution in the body of your question, but do NOT use the /linux tag.

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 views

Accidentally deleted yum.repos.d/ directory in my Amazon Linux AMI 2018.03 machine

By mistake i deleted yum.repos.d/ folder and all .repo files inside this folder using sudo rm -rf yum.repos.d/ so now i am not able to install anything and also not able to update. After deleted once ...
0 votes
3 answers
34 views

Print ONLY the last line after a match with awk

I have a command that prints the line directly after a match with several pipes using different tools like grep, awk, and tail. This works but it feels somewhat messy and uses multiple pipes to ...
  • 173
0 votes
1 answer
18 views

Can't change bridge subnet or create network on Docker

I would like to build a small infrastructure entirely under Linux. For the LDAP and file server part I would like to set up a Docker server that will host the OpenLDAP and Owncloud containers. I would ...
  • 59
0 votes
2 answers
36 views

How to read a file and write in to another file using a shell script [closed]

I have a file which looks like this (file1.txt) 258.2222 I have to write this file1.txt value to another file. if there in no value (empty) in file1.txt then it should print as "Passed". ...
  • 11
0 votes
1 answer
18 views

VLANs in bare metal servers

I have three bare metal servers; server number one and number two are within the same LAN. I intend to set up two virtual machines (let's call them A, B) on server number one, two virtual machines (C, ...
  • 9
1 vote
1 answer
14 views

Local filesystem mounted as remote by systemd in OL8.6

Two RAID SSDs partitioned as follows. Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 65536 bytes / 65536 bytes Disklabel type: ...
1 vote
1 answer
29 views

Tool that measures single command CPU/Memory usage?

Are there any usefull tools that can measure the CPU/Memory usage of a single command? I want something like: cpu_mem_perf some_executable args1 args2 and cpu_mem_perf will print the CPU/Memory ...
  • 111
0 votes
0 answers
11 views

Route traffic through static route instead of default gateway for docker services

In my linux based server, default-gateway is set as ip default-gateway 10.77.122.1 and static route is set as ip route 0.0.0.0 0.0.0.0 gateway 10.106.142.1 I have a java based app which is ...
  • 101
0 votes
0 answers
22 views

How to rename file with the proper extension when not knowing what they are?

I have about 100000 files in a directory without extension, i don't know what they are some seems to be pdf, jpg, png , xls etc ... Is there a simple way to add the extension for each file ? My ...
  • 101
1 vote
1 answer
20 views

rsync fails to work with -o StrictHostKeyChecking=no option

Below rsync works and helps copy remote directory to localhost /bin/rsync -rv myremoteuser@myremotehost:/tmp/Deployments/ /web/playbooks/automation/getfiles/tmpfiles/4/E5EA787E/myremotehost/ Once i ...
  • 429
1 vote
0 answers
10 views

Modifying specific SMTP messages while in transit using a Postfix Filter

I'm looking to set up a simple Postfix server that can modify the content and recipient of some specific SMTP messages, and I'm not confident in approach so far and feel like I missing some basics of ...
0 votes
2 answers
26 views

Unable to pull directory from remote host to local using rsync

My issue is a a small part of a bigger problem i m trying to resolve. The issue started with rsync command that was very complex and constructed by ansible and does not work ... reported here: https://...
  • 429
0 votes
0 answers
5 views

no internet connection after using arimon-ng

I've learning about airmon-ng and I realized that when I start using wlan0 and stop the process, the network connection is still down. here is what I've done so far: sudo airmon-ng start wlan0 sudo ...
0 votes
0 answers
8 views

Deploying Virtual Machines on-demand HPC

My university has an HPC, which is currently in a usable state, but the dependencies and libraries are a mess. In the event that we reset the hardware and start from scratch, I want users across the ...
0 votes
0 answers
19 views

How to solve the error kex_exchange_identification: read: Connection reset by peer Connection reset by ::1 port 2022

I use Kali linux and I would like to connect in localhost on my own system with ssh but when I do ssh root@localhost -p 2022 I get the error kex_exchange_identification: read: Connection reset by ...
  • 1
-1 votes
0 answers
35 views

Is it possible to create a GUI for an embedded Linux host?

I'm new into the group and thought maybe somebody could help with a question. I am a system administrator and responsible for the Network admintration and Telephony system as well. We use an Alcatel ...
-2 votes
0 answers
22 views

I want to see the system log for a python program in Ubuntu

I have a Python program running in Ubuntu. The program is correct. But, somehow, it crashes. So, how do I see the log entry for the crash? Note: A log entry is that which an Operating System keeps ...
0 votes
2 answers
29 views

What happened to a sleep command after server shutdown?

I would like to execute a script after 5 hours. My script is $cat << EOF > run.sh sleep 18000 sh run_my_script.sh EOF I submitted the job as: sh run.sh >& log & But due to some ...
  • 101
0 votes
0 answers
8 views

Tomcat start up expands JAVA symlink path to real absolute path

For setting up a path for binaries symlinks are the best way to go, however I encountered issues when the overlaying application uses this symlink sometimes goes for the exact absolute path. For eg: ...
-6 votes
1 answer
39 views

the output between zsh and bash

i write this command in zsh pwd ; ls ; cd /etc ; pwd ; cd ; pwd ; ls ; echo $BASH_SUBSHELL} /root Desktop Downloads Music Public Templates Documents for_play Pictures pycharm Videos /...
2 votes
3 answers
59 views

Sed replace the middle string

I have this this String 22<>22 And i have this list test dev too The output should be like 22test22 22dev22 etc.. This is the commands i use for do that cat list | sed 's/$/22/g' | sed 's/^/...
1 vote
0 answers
14 views

Can I change the attributes of a directory from a failed mirror that is showing as a file back to a directory

I had a raid mirror fail and I was able to bring back up one of the drives after I replaced a bad HBA and copy everything to another system. I had a backups directory on this mirror that is now ...
3 votes
1 answer
74 views

Parameter Substitution inside Indirect expansion

I want to achieve the Parameter Substitution inside Indirect expansion. But I am not able to achieve it with a single command I get the Bad Substitution, let me know if there's a clever way of solving ...
0 votes
0 answers
14 views

windows 10 on virtualbox linux webcam not working [closed]

i am using arch Linux . i have installed virtual box and i ran windows on it but it seems i have a problem with my camera driver. i have installed the CD guest addition to enable the webcam. in my ...
1 vote
1 answer
19 views

extract links from webpages which require interaction

I'm trying to figure out how, from a linux shell, to extract the links from a webpage in which the links appear only after clicking a button on the webpage, for example the "Assets" in ...
  • 323
1 vote
0 answers
25 views

Runnig python window app on linux (Fedora) without gdm

I have a small project, the project is running python (windows application) as below.On linux Fedora without using gdm,Gdm must be disabled. Any Idea please? What library I have to download ? # ...
1 vote
0 answers
9 views

What are 'default' props in xinput/libinput for?

I wanted to adjust vertical (two-finger) scrolling speed via xinput because my DE's settings utility does not expose that setting. So, I ran xinput --list-props to fetch a list of available settings ...
4 votes
3 answers
166 views

Help with Find command: Find files or folders that start with a space (ore more than one space) on linux

How do I do a search for any of the following: Find folders that start with a space on linux and then remove any starting spaces so the folder can start with a letter or a number? Find FILES that ...
  • 129
2 votes
1 answer
30 views

dnsmasq dhcp not listening on port 67

I'm trying to host a DNS and DHCP service with dnsmasq. Here is my dnsmasq.conf # DHCP dhcp-authoritative bind-interfaces dhcp-range=192.168.122.2,192.168.122.99,12h dhcp-leasefile=/var/lib/dnsmasq/...
  • 23
0 votes
0 answers
18 views

Kate Editor LSP Client: Any way to specify an "entry file" for compilation?

Goal: If I have two c files, A and B, and I don't plan to compile B into an object file, but rather include it directly in A, can clangd (or any other LSP service that works with Kate) show me only ...
-2 votes
1 answer
20 views

How to take input from a file and redirect the output of that input to another file

Lets say I have 2 files -file1 and file2 file2 is empty and file1 has ls-l in it, so how can I take the ls-l from file1 to the terminal and output its content to file2
  • 1
1 vote
0 answers
12 views

add virtual network to container from systemd nspawn

i have virtual machine ubuntu 22.04. Network interface this vm is in bridge mode. inside this vm I have created buster container (debian) and edited it's unit file i added --network-ipvlan=enp0s3. I ...
1 vote
1 answer
30 views

How to search file name just created by some one on Linux server

How to search multiple files which has been created. I'll try to explain my problem as best as I can, but please pardon my English .. What I'm trying to do, seemed simple enough to me, however every ...
2 votes
0 answers
18 views

can't install iso linux from eays2boot usb stick

i set up a usb with easy2boot to try live or install iso's from it, copied some iso's to the stick in the linux folder, but when I try to install a live system of debian, it starts briefly and then ...
  • 21
1 vote
1 answer
32 views

Is it possible to disable page caching on Ubuntu?

I am running an application on Ubuntu 20.04 which requires me to clear the page cache everytime I run it. Currently, I just run echo 1 | sudo tee /proc/sys/vm/drop_caches everytime before I run the ...
0 votes
0 answers
5 views

Xrandr output one more pixel offscreen vertical

Long story short i am stretching a 2048x1536 output on a 2560x1600 monitor (sometimes) for accessibility issues for an old app #I either run xrandr --output eDP-1 --mode 2560x1600 #or xrandr --output ...
0 votes
1 answer
29 views

keep getting bad usage while trying to perform a partitioning and Formatting a Disk Drive in Linux

Disklabel type: gpt Disk identifier: 6C5A63BF-EF32-9244-8273-250775DB79D6 Device Start End Sectors Size Type /dev/sdb1 8704000 18874476 10170477 4.9G Linux filesystem /dev/sdb2 20480 ...
0 votes
1 answer
32 views

Finding the PORT NUMBER of the process using a specific PID?

I have a specific PID and my question is how can I know which port belongs to that PID. Any tips on how to know the port of a service that has a specific PID? Thanks a lot.
  • 1
0 votes
0 answers
18 views

How ot recover specific folder from a formated partition?

Hi everybody this will be a long question, and I would be really grateful for any kind of help anyone could give me, this is my case: I use firefox-sync to manage all my logins information and firefox-...
  • 1
0 votes
0 answers
9 views

How to calculate boot time including (BIOS and boot loader) of RedHat 7 or 8 versions?

systemd-ananlyze time gives me the time taken for kernel, initrd and userspace. How do I calculate for BIOS and bootloaders like GRUB2 etc which completes calculation of the boot time of the OS. ...
1 vote
1 answer
31 views

Multiple commands in variable? [duplicate]

Is it possible to execute multiple commands stored in a variable? Singe command works fine variable="echo HELLO" $variable HELLO I would like to have something like this variable="...
's user avatar
3 votes
3 answers
73 views

PROMPT_COMMAND output in shell script using piping LINUX

I want to make a shell script that shows the available data on my root directory and shows it continuously after each new command in the prompt by using PROMPT_COMMAND in the shell script. However, I ...
0 votes
3 answers
27 views

Is there a better way to deal with long file paths for copy-pasting files?

My problem with the cp command is that I have to remember both paths to type them in one go and if I forgot what directory comes next, I can't look it up (I'd have to erase the command I've typed so ...
0 votes
2 answers
22 views

Script to change file/folder names which contain illegal characters (Synology NAS)

We have an issue where a set of data that was migrated from an old DAS drive which was attached to a Mac Mini acting as a server contains many illegal folder names (namely colons :). Some of the users ...
0 votes
0 answers
9 views

Check login attempt to the server from log file

I'm tryig to display all users who successfuly logged in to server last 24 hours from logs file Command last is not acceptable I tried cat /var/log/auth.log Error /var/log/auth.log: No such file or ...
0 votes
0 answers
17 views

Linux VSCode unable to use

when I was trying to open vscode on ubuntu, it always showed this blank page, whatever i chose any option. I tried to uninstall and reinstall vscode but still appeared like this. also, i tried to ...
1 vote
1 answer
21 views

How do we access the "icmp" protocol in ip6tables?

The ip6tables command accepts icmp and icmpv6 protocols: $ sudo ip6tables -A INPUT -p icmp -j ACCEPT $ sudo ip6tables -A INPUT -p ipv6-icmp -j ACCEPT However, when I test with the ping command: $ ...
  • 2,419
1 vote
0 answers
13 views

Wireguard to endpoint Inside a Namespace

I have three VM's. VM-A,VM-B & VM-X. I have a application running on the backend server VM-X. VM-A is the Main frontend server which has high capacity. VM-B is just a standby server of low ...
  • 139
0 votes
0 answers
7 views

Modify CentOS livecd to include scripts of ones choice

I am trying to create a livecd of CentOS that boots directly into RAM and runs some scripts that I have. First, I downloaded the livecd iso for Centos 7 from centos mirror and I was able to unsquash ...
0 votes
1 answer
21 views

How does Linux Manage the Termination of Sessions?

I understand that maxlogins can be configured to limit the number of concurrent sessions in /etc/security/limits.conf or /etc/security/limits.d/*.conf. Example: hard maxlogins 10 Let's say I want to ...

1
2 3 4 5
719