Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
13 views

Sudo hangs to run software EastFDTD

As I want to run a program, I command it as below and then I fill in the password. Next it hangs, did not do anything. What I am suppose to do, reboot my pc and program or there are some tricks to ...
2
votes
2answers
58 views

How does Linux know how and what drivers to install in a new installation

I would like to know how Linux, such us Ubuntu, "know" how and what drivers to install when installing it from scratch. For example, I buy a new computer without any system and I install Ubuntu. ...
1
vote
3answers
66 views

Checking server is listening without telnet, from CLI?

Typically an easy diagnostic approach to checking an application server is running is to run telnet again the host and port: telnet somehost port The issue is that some operating systems, such as ...
0
votes
0answers
9 views

Forwarding data coming at ethernet port to wlan hotspot ip linux server

I have UDP packets coming in via ethernet at 192.168.1.2 and I have a hotspot running at 10.42.0.1 I am connected to the hotspot. How do I configure my network so that packets coming to 192.168.1.2 ...
1
vote
1answer
62 views

ssh.service will not start at boot if using ListenAddress in sshd_config but it will if started manuall after boot [duplicate]

I have ListenAddress in my /etc/ssh/sshd_config. ssh.service will not start at boot but it will start if I run service ssh start after boot. Here is the error from /var/log/syslog: $ sudo cat /var/...
1
vote
1answer
21 views

Debian 8 - Lan connection works but no internet [Unknown host]

I have a Debian 8 server that has been running great for about a year. All of a sudden I am no longer getting internet access. The server is connected over an ethernet cable and I can SSH into over ...
0
votes
1answer
42 views

How do I use grep to output only the names of files that contain any ipv4 address

I am using Red Hat Enterprise 6 and I'm trying to search through the /etc/ directory for files that contain any IPv4 address.
1
vote
1answer
29 views

Sharing swap partition between Ubuntu and Kali

I am making a fresh install dual-boot for kali and ubuntu. I had this question in my mind if I will create a swap-area of 32GB (16 Gb RAM) will it work for both the Linux distro?
-1
votes
1answer
44 views

Command Line Options for a script

$ cat test15.sh #!/bin/bash # extracting command line options as parameters # echo while [ -n "$1" ] do case "$1" in -a) echo "Found the -a option" ;; -b) echo "Found the ...
0
votes
3answers
42 views

LINUX: tar: You may not specify more than one '-Acdtrux', '--delete' or '--test-label' option [closed]

sudo tar xuzf splunk-7.2.4-8a94541dcfac-Linux-x86_64.tgz -C /opt I get the following message: tar: You may not specify more than one '-Acdtrux', '--delete' or '--test-label' option Try 'tar --help' ...
4
votes
2answers
152 views

Getting information about short-lived processes

I want to trace existing process and especially their parameters (like environment variables, cwd directory, stdout and so on). I can do it. However, I cannot get that information about short-lived ...
10
votes
1answer
472 views

Is “Cached” memory de-facto free?

When running cat /proc/meminfo, you get these 3 values at the top: MemTotal: 6291456 kB MemFree: 4038976 kB Cached: 1477948 kB As far as I know, the "Cached" value is disk ...
0
votes
0answers
16 views

How to fix keymap after ubuntu installation

Recently I've installed Ubuntu 18.04 on my pc alongside Windows 10. I added nouveau.modeset to grub boot script to be able to log in (there is an issue on Dell XPS 15, which prevents ubuntu from ...
0
votes
1answer
27 views

How to set VirtualBox VM to use wanted resolution without needing to edit bootloader config or passing kernel parameters

I want to test many of liveCD distributions in VirtualBox (specifically, want to test their installers). Some linux distributions use curses based installers (not X11). By default VM's window is ...
0
votes
0answers
9 views

Linux Deploy - LMMS and Audacity

I'm using Linux Deploy on an Android phone, here are the installation and device specs: My device is SM-G900F, LineageOS 15.1, Debian stable, XFCE, installed as folder, using XSDL, chroot container, ...
-3
votes
0answers
38 views

Why my cronjob is not sending the emailbody and where shoud i setup my cron file? [closed]

I have a script which sends me an email with some contents.In the test.sh file i have redirected the contents of the body to output.txt file. when i run in the directory it works fine am getting the ...
-1
votes
0answers
15 views

BIND Reverse zone - ignoring out-of-zone data ubuntu server 18.04

i have a problem with reverse zone in BIND ipv6, add this pic for more information, i cnt resolve this
0
votes
1answer
17 views

save a variable to a file on the terminal in Linux same way in matlab save()

Is there way to save a variable to a file on the terminal in Linux same way in matlab save(filename,variables) function? For example I have in matlab seg=sampleframe(:,1) # this a 20 sn segment ...
0
votes
1answer
23 views

Read arbitrary amount of memory with process_vm_readv

For process_vm_readv the linux man page states: [...] (Avoid) spanning memory pages (typically 4KiB) in a single remote iovec element. (Instead, split the remote read into two remote_iov elements ...
0
votes
1answer
25 views

Backup / Sync Linux HDD with rsync, need rsync equivalent for Windows PC [closed]

I have a laptop running Debian 9 with ~200GB of drive space. I have a Desktop PC running Windows 10 with ~3TB of drive space. How can I backup my /home/ linux dir using rsync to my Windows PC? What ...
0
votes
0answers
35 views

rsyslog template with multiple filters and condition

This just in continuation of my previous post While working with the rsyslog configuration i have came across many challenges and got to know many caveats of it while most of my config is working now ...
0
votes
0answers
17 views

chroot multiple directories in linux using active directory groups

I have integrated a linux server with Active directory. I have multiple Active directory groups created sftpgroup1, sftpgroup2 and sftpgroup3. UserA is part of sftpgroup1 and sftpgroup2. I am trying ...
38
votes
6answers
2k views

How do I use swap space for emergencies only?

I have a Debian (Buster) laptop with 8 GB RAM and 16GB swap. I'm running a very long running task. This means my laptop has been left on for the past six days while it churns through. While doing ...
0
votes
0answers
16 views

Packet capture with iptables/rsyslogd?

The usual way I know of capturing packets is with iptables/NFLOG/nflog-group and ulogd with libpcap.so built in. It's a simple matter to enable packet capture in the ulogd.conf file and all rules that ...
0
votes
1answer
38 views

What distro allows you to create a folder and a file with the same exact name?

I am trying to figure out which distro this script (scene_splitter.sh) was built for. Everytime I try to use it I get the following error. x@x-pc:/media/x/WD_2TB_HDD/test$ ./scene_splitter.sh 001.mp4 ...
1
vote
1answer
64 views

Could not chdir to home directory /home/user: Permission denied

After getting a new VPS with Debian 9, I created a new user using root. I created a new username called joe with this command adduser joe. Then, I used usermod -aG sudo joe to grant administrative ...
0
votes
1answer
28 views

Why am I seeing a ton of SyS_poll?

I have two different Linux desktops connected to a Synology NAS like so: 10.0.0.20:/volume1/chronicle /chronicle nfs rw,hard,intr 0 0 and I am frequently seeing my computer locking up ...
5
votes
1answer
464 views

What happens when you rsync without a destination path? [duplicate]

I copied a file to destination without providing the path. It seems to have copied successfully, but i cant find the file in the destination, where could it be located? rsync -av --progress file.txt ...
0
votes
0answers
43 views

Linux iptables forwarding

I've 3 machines : 1 server with LAN card without internet direct access 1 Windows host with WiFi connection for Internet and 1 LAN port 1 linux virtual machine on the Windows host [...
0
votes
1answer
31 views

Linux permission octal representation [duplicate]

I want to know the octal expression of the linux file permission command: -rwxr-xr-t
1
vote
1answer
23 views

Hosting a simple honeypot server in each of 3 VLANs using one ethernet port

I am trying to set up a honeypot server in different VLANs. The company I work in has 3 VLANS: 10, 20, 30. My goal is to use a Raspberry Pi to host a simple honeypot and broadcast sniffer (for ARP and ...
0
votes
1answer
31 views

fstab keeps asking for password, while trying to mount shared cifs

I have the following entry in my fstab file: //10.30.1.235/Restrito/BackupVms /backups/servidor01 cifs vers=2.0,credentials=/spassword,iocharset=utf8,gid=0,uid=0,file_mode=0777,dir_mode=$ 0 0 ...
1
vote
0answers
113 views

Troubles while installing any Linux OS on Asus TUF FX504

Tried to install Ubuntu, Antergos and Kali linux KDE on a new laptop Asus TUF FX504. Before I did it I disabled Fast & Secure boot set the SATA Mode Selection to AHCI disabled legacy USB ...
0
votes
1answer
77 views

Ignore case in Find command

I want to search file in 2 different directories using find command, find $file_dir1 $file_dir2 -name 'searchpattern*' | tail -10 I am using this command now, but it is case-sensitive search. I ...
0
votes
3answers
34 views

Copy a file in a destination folder

I have a file in a very long path, for example: /opt/very/long/path/file1 I want to copy the file in this directory: cp /opt/very/long/path/file1 /opt/very/long/path/file2 I don't want repeat this ...
0
votes
2answers
31 views

How can I make python detect missing packages or apps [closed]

I'm making a script for Ethical Hacking purposes and I want to have a first function that detects and shows the user what packages they need to install before they can continue. For example, I would ...
0
votes
0answers
25 views

Optimization osm map server

I installed an osm map server on Ubuntu 18.04. It works, but speed rendering is low. I tried to optimize it. I installed two Web servers (Apache2 + nginx) because nginx is faster than Apache. This ...
3
votes
0answers
31 views

How to unpack a tag.gz file without having 2x free space?

I have about 1 million small files, that take up about 20 GB. I need to upload them to a host that only has 23 GB free space. I would prefer compressing the files locally to increase the transmission ...
2
votes
1answer
41 views

2 grep calls with pipe doesn't work as expected

I came up with the following command: grep 'rtl' reg_list.txt | grep -E -o -n "id_\w+" reg_list.txt The idea is that first grep lines which contains rtl content, then grep only the words which starts ...
1
vote
0answers
24 views

How do I run a raw file in qemu? [closed]

I have been trying to run this project from github. https://github.com/asafch/xv6-paging My machine is running ubuntu 18.04, so this code isn't running here. I have seen this solution Booting a raw ...
3
votes
1answer
384 views

Determine free space available on a USB flash drive in C (linux)

I would like to figure out the available free space on a USB flash drive in a C program in Linux. I have earlier used system("df -h /dev/sda1") to figure it out but using system command in a Linux C ...
-1
votes
0answers
16 views

How ARP Cache Work in linux?

I Know the ARP protocol uses and the role of the cache but I have difficulty understanding the difference between various states of the entries in the ARP Cache like : permanent , noarp , reachable , ...
1
vote
1answer
46 views

How should I pass 32-bit arguments to Linux syscalls on x86_64?

If a syscall needs some 32-bit arguments like uid_t or int (for file descriptors) or unsigned int or even some 16-bit type, how can I pass them using 64-bit registers? Do I need to zero-extend or ...
-1
votes
1answer
30 views

Changing the prompt in Ubuntu

The line that I type in on Ubuntu looks like this: username@DESKTOP-FOO:~$ when I want it to look like this: username@userPC:~$ How do I fix it?
1
vote
1answer
18 views

How to untar all .tgz files in a folder and write to new files with different Naming convention

I have folder thay contains many .tgz files, each uncompressed file has SAME file name "000000_0". Can someone write me a command to do below? 1. Untar all the .tgz files from a folder 2. rename ...
2
votes
0answers
16 views

XFS on-disk format upgrade

Is there any other way to upgrade an already formatted xfs v4 on-disk format partition to a xfs v5 without a back up-reformat-restore process? This was a result of creating the partitions using debian ...
0
votes
0answers
27 views

Grub takes very long (several minutes) to open Menu (in Multi-Boot-System)

I have a Multi-Boot-System with 4 different installations of Linux. (1 Manjaro, 3 Mint) spread over 2 hard drives (2 on each). After doing grub-install /dev/sdX and update-grub several times within ...
0
votes
1answer
18 views

Linux - Bash - variable assignment with command substitution is missing the newlines [duplicate]

I am running into a bit of an issue / quirk here: [root@s06p5bcsmta001 elves]# TEST=$(cat -e sendlog) [root@s06p5bcsmta001 elves]# echo $TEST | wc -l 1 [root@s06p5bcsmta001 elves]# cat sendlog | wc -...
0
votes
0answers
35 views

find `-delete` doesn't delete files? [duplicate]

Look at this example: $ ls -l /home/kossak/.asdf/shims/gettext -rw-rw-r-- 1 kossak kossak 0 Feb 6 13:51 /home/kossak/.asdf/shims/gettext $ find ~/.asdf/shims -name 'gettext' -or -name 'gettext.sh' /...
2
votes
1answer
45 views

Script to add a block in a few hundred files

I want to add the following lines if ($http_user_agent ~* "somewebsite" ) { return 444; } to all my vhosts in NGINX as follows server { location / { want_to_add_those_3_lines_here } } ...