date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,470,620,934,000 |
Without having access to the physical display, how can I know if my computer is being booted by grub or systemd-boot?
As I have writted on the tittle I have both /boot/grub/ and /boot/efi/EFI/systemd/ folders.
On the other hand dd if=/dev/sda bs=512 count=1 2>/dev/null | strings returns the following:
ZRr=
`|f
\|f1
GR... |
The fact that efibootmgr -v works proves your system has UEFI runtime services enabled, which can only happen when the system is booted in UEFI mode.
(As Marcus Müller said in the comments, the reverse inference cannot be made: it would be possible to boot in UEFI mode even without UEFI runtime services being enabled,... | How to know if computer uses GRUB or systemd-boot through SSH? (I have both /boot/grub and /boot/efi/EFI/systemd folders) |
1,470,620,934,000 |
My setup:
1 hdd with Windows 10 installed
1 ssd with Archlinux using systemd-boot installed
Motherboard: MSI X470 Gaming Pro
I first installed Arch, then Windows 10 and the dual boot worked like a charm, but after a BIOS-update, my Motherboard keeps automatically booting to Windows without going though systemd-boot ... |
UEFI has it's own boot manager. This boot manager uses variables in NVRAM to locate and execute a bootloader and your BIOS uses these variables to list boot options in the boot menu. It's very likely that your BIOS Update interfered with your NVRAM and caused the problem.
| Dual boot keeps booting to windows |
1,470,620,934,000 |
I installed the systemd boot loader. But while booting it shows /vmlinuz-linux and initramfs-linux.img not found.
How can I fix this?
My directory structure is as follows;
Output of lsblk:
|
Your /boot and /boot/efi are on separate partitions. The UEFI firmware expects to fine the missing files on the EFI System Partition, which is mounted on /boot/efi, but they are now in /boot.
Move the files to /boot/efi, or better yet merge the two file systems so that the EFI System Partition is mounted on /boot.
| systemd-boot: /vmlinuz-linux not found |
1,470,620,934,000 |
I'm having difficulties installing an image I've built with Yocto. In the past I've always used u-boot, MBR, and legacy boot. Installing Yocto meant creating boot and rootfs partitions, installing the first stage u-boot boot loader, and copying the files in /boot to the boot partition (a FAT32 partition).
Now I'm tryi... |
The problem ended up being an obscure BIOS setting, which I found looking through the documentation of the machine I'm using. I saw that they noted, in order to make Ubuntu boot on that machine, you had to turn on "PinCntrl Driver GPIO Scheme" in the BIOS. I made that change and my Yocto build started working as wel... | How can I manually install a Yocto image? |
1,470,620,934,000 |
I'm installing Arch Linux on a new machine, and I've gotten to the point where I need to configure the bootloader, however this is failing:
# bootctl install
Failed to create EFI Boot variable entry: No space left on device
Looking at the variables, I can see the problem:
# ls -la /sys/firmware/efi/efivars --sort=siz... |
Ok, so it turns out that to prevent accidental deletion of UEFI variables, only whitelisted ones are allowed to be deleted by default. Others are marked as immutable which prevents them from being deleted by accident:
# lsattr
-------------------- ./BootCurrent-8be4df61-93ca-11d2-aa0d-00e098032b8c
----i--------------... | Can't delete UEFI variable - no space left / operation not permitted |
1,470,620,934,000 |
I use systemd-boot as boot manager.
I have the menu with many entries but 90% of time I choose entry #3.
Is there a way to hide the menu as default?
In this way when I want to boot #3, it skips timeout and menu is not shown.
While if I want to choose anything else, keep pressing a key i.e. shift to show the menu?
|
According to the manual of loader.conf you can disable the timeout and it does what you want:
timeout
How long the boot menu should be shown before the default entry is booted, in seconds. This may be changed in the boot menu itself and will be stored as an EFI variable in that case, overriding this option.
If the ti... | Show/hide systemd-boot menu |
1,470,620,934,000 |
OS: Parabola GNU/Linux Libre, a GNU version of Arch.
I have managed to encrypt my root partition, but I'm unsure about how to encrypt my swap partition. I know swap partitions are becoming old-fashioned and that swap files are preferred, btrfs still does not support this.
lsblk
NAME MAJ:MIN RM SIZE RO TYPE ... |
It would be simpler to make one encrypted container and set up both / and swap on that with LVM.
Like this:
sda1 boot
sda2 LUKS-crypt
LVM
root-LV
swap-LV
Then you only need one key to open it, letting you skip crypttab altogether.
| Timed out error waiting for encrypted swap device |
1,470,620,934,000 |
My problem is the following: After my last update (pacman -Syu) my system hangs on boot, and I can't figure out the cause (it's driving me crazy, really)
Searching on the web I found out that this could be caused by a bad fstab file, but this doesn't appear to be the case.
The distro I'm using is Manjaro linux (it is... |
It's been a while, and there are many causes for a this problem it seems (fstab misconfiguration, orphan config files, etc), but for me using 'grep -r plymouth /' and then deleting the statements calling plymouth solved it
| plymouth causes system to hang on boot |
1,470,620,934,000 |
I have placed a systemd service file in usr/lib/systemd/system/testfile.service.
Here is the service file:
[Unit]
Description=Test service
[Service]
Type=notify
ExecStart=/bin/dd.sh
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartSec=30s
[Install]
WantedBy=multi-user.target
I tri... |
You should store your custom unit files in /etc/systemd/system/. After you create them, you have to enable them with systemctl enable name, which creates necessary symlinks.
| Start a service at boot time in systemd |
1,470,620,934,000 |
Or, perhap equivalently, can a bootable root volume be named other than "root"?
While installing a new version of a Linux IS I created an lvm2 logical volume named "ub20-root" intended as a bootable root with near success. I had a line in systemd-boot configuration file
options root=/dev/mapper/crypt3--vg-ub20--roo... |
I'm not sure about systemd-boot, but grub works with any name. Naming / lv root is just a "best practice" to make it clear what the lv contains. I have a system with root lv named 00 and swap lv 01 and it works just fine.
$ cat /proc/cmdline
BOOT_IMAGE=(hd0,msdos1)/vmlinuz-5.8.6-301.fc33.x86_64 root=/dev/mapper/fedor... | Can multiple lvm2 volumes in a single volume group be bootable root volumes? |
1,470,620,934,000 |
I'm installing Arch Linux manually (using an ISO image) on a KVM virtual private server.
I'm booted into the ISO image, but it was not booted with EFI.
Is it possible to use systemd-boot in this circumstance?
This post doesn't appear to have a good answer for my situation:
The instructions I'm following suggest a boo... |
Yes, you need a kernel and bootloader to boot a KVM virtual machine.
But you can only use systemd-boot if your KVM virtual machine is configured to boot via UEFI, as it is a UEFI-only bootloader. Most VPS providers, including Vultr and Digital Ocean, only support legacy boot (for now). When these providers expand to s... | how to use systemd-boot on a KVM vitual server? |
1,470,620,934,000 |
I'm producing a yocto build, and want to enable UEFI Secure Boot on the intel machine I'm using. This is a pretty basic yocto build, using core-image-minimal and meta-intel. The artifacts it produces look like:
./core-image-minimal-intel-corei7-64.wic
./bzImage-intel-corei7-64.bin
./bzImage--6.1.38+git0+d62bfbd59e_1... |
Try clearing the PK (Primary Key) before trying to input other keys. This should place Secure Boot into Setup Mode in which there should be minimal restrictions on key updates. After updating any other Secure Boot key variables to suit your needs, input your key as the PK to return Secure Boot to normal mode.
Primaril... | How do I enable UEFI secure boot for a linux build made with yocto? |
1,470,620,934,000 |
I'm using EndeavorOS (basically Arch), but with systemd-boot and dracut for initrd. I have a simple setup with an unencrypted boot partition and LUKS-encrypted root and swap partitions. Specifically, the setup is described in the output below:
$ cat /etc/fstab
# <file system> <mount point> <type> <option... |
Not an Arch expert, the Debian-centic script works well for me on Debian, but according to this Archwiki page should, or at least is expected to work.
Passwords entered during boot are cached in the kernel keyring by systemd-cryptsetup(8), so if multiple devices can be unlocked with the same password (this includes d... | How to open all LUKS volumes with use of a single password? |
1,470,620,934,000 |
Recently has been released version 6 of Memtest86+ which finally introduce UEFI support.
Now, I use systemd-boot as boot manager, so I'd like to launch memtest86+ directly at boot.
I set up a configuration file /boot/loader/entries/memtest.conf as described here [1]:
title Memory Tester (memtest86+)
efi /mem... |
It was an issue
Now solved upstream. Starting with version 6.10 you can launch memtest86+ from systemd-boot out-of-the-box.
| memtest86+ cannot boot via systemd-boot EFI |
1,576,378,419,000 |
I use systemd-nspawn to run a few containers. I can have them started in the background using systemctl start systemd-nspawn@foo. On occasion, however, I start with systemd-nspawn -bD foo. I couldn't find any way to send it to the background. Closing the terminal just kills the container as machinectl list shows. Can ... |
Ok, so, for what it's worth, the following was successful for me:
sudo systemd-nspawn -bxD/
Practically identical to yours, except I don't give the machine a name and I get an -x ephemeral btrfs snapshot of my / for the container's root.
That brought up the container's getty on my terminal's pty and I logged in to lo... | How do I background a systemd-nspawn container? |
1,576,378,419,000 |
I combined the detailed instructions from the original blog post, and the more up to date instructions from the man page (using dnf instead of yum).
# sudo dnf -y --releasever=24 --installroot=$HOME/fedora-24 --disablerepo='*' --enablerepo=fedora --enablerepo=updates install systemd passwd dnf fedora-release vim-minim... |
For some reason, dnf didn't set the "right" SELinux label on /etc/passwd. But it did set a label on /bin/passwd. That mismatch is what causes the problem. Further explanations welcomed :).
$ ls -Z fedora-24/etc/passwd
unconfined_u:object_r:etc_t:s0 fedora-24/etc/passwd
$ ls -Z /etc/passwd
system_u:object_r:passwd_f... | systemd-nspawn OS container is unusable because I can't set the root password |
1,576,378,419,000 |
Why nspawn is slow compared to docker podman and even qemu?!
CPU tasks take twice of the time it takes in docker, podman or qemu
Here is a benchmark test I did:
First I disabled all the spectre/meltdown mitigations in the host kernel (and the qemu guest kernel in the case of qemu benchmark) using:
GRUB_CMDLINE_LINUX_D... |
The problem of performance was because I thought that whitelisting the syscalls en nspawn with --system-call-filter will improve the performance, but as they explained me in systemd mail list I should use export SYSTEMD_SECCOMP=0, because nspawn will still be processing syscalls when I whitelist them.
SYSTEMD_SECCOMP ... | Why systemd-nspawn is slower than docker,podman and qemu?! how to Improve nspawn performance? |
1,576,378,419,000 |
I have a script that contains the following:
sudo machinectl start "$machinename"
sudo systemd-run -PM root@"$machinename" "$command"
Failed to connect to bus: No such file or directory
Failed to start transient service unit: Transport endpoint is not connected
This fails because the first line only starts booting t... |
Depends what you are trying to do. I'll give a direct answer to your question then answer some alternatives. I'm assuming you're using systemd as the init system in the container, which will be true if your container OS is based on Debian / Arch / Ubuntu or similar.
Executing a command after starting a nspawn containe... | How do I wait for a systemd-nspawn container to boot? |
1,576,378,419,000 |
Quite recently I started using systemd-nspawn to set up other OS instances on my Arch box. One thing I'd like to do is detect if I'm inside a container, and if so, add the distro name (from lsb_release) to the terminal title. On Debian-based systems, the default .bashrc uses debian_chroot for a similar purpose. How do... |
systemd-detect-virt can tell you whether your system is running in a VM/container. This requires systemd-detect-virt inside your container, but the systemd documentation on minimal builds suggests that you can just build a package that only includes systemd-detect-virt.
| How can I detect if a system is running inside a systemd-nspawn container? |
1,576,378,419,000 |
Looking at the documentation for systemd-nspawn, it must have been intended to have a very user-friendly way to launch containers in a different network namespace. You use the -n option, and simply enable systemd-networkd.service on both ends. The container gets its own IP address in one of the "private" ranges. (D... |
The problem is Fedora's firewalld. It seems nspawn was never integrated with firewalld. (nspawn isn't correctly integrated with Fedora's SELinux policy either).
As mentioned in the question, libvirt is working fine :). We can use the same trick people discovered for running containers with LXC on Fedora.
Update: th... | systemd-nspawn container with separate IP address (network namespace) not working |
1,576,378,419,000 |
I would like to expose to a container (Ubuntu 16.04 created with debootstrap) started with systemd-nspawn a directory of the host system (also an Ubuntu 16.04). Is this possible with systemd-nspawn?
I would fallback on some NFS based solution (the host exposes the directory which is mounted by the guest) but a systemd... |
The systemd-nspawn command has a --bind option that lets you "bind mount" a directory from the host filesystem into the container.
If you just do --bind /path/to/dir then it will appear in that name inside the container.
If you do --bind /path/to/dir:/foo then it will show up as /foo inside the container.
In order to ... | How to expose a directory to a container? |
1,576,378,419,000 |
Is it possible to use nspawn for a single executable? My goal is just to isolate the process tree of the application, not portability.
Let's say you wrote an application in C, built for your target platform. Today I am able to run this as a systemd service by configuration via a systemd unit file. Is there a way to ma... |
Have you read through the systemd-nspawn man page? Nothing in there says that you require debianbootstrap, and in fact it shows several non-debian examples.
You do a root filesystem, but just like a Docker container (or even a traditional chroot environment) that doesn't require anything more than your executable a... | Minimal system-nspawn container for process tree isolation with embedded applications |
1,576,378,419,000 |
Trying to get powerline/airline symbols to show in vim running in a Debian container created with sudo systemd-nspawn -D ~/debian-tree/ on a Fedora host.
Right now it just shows question marks in diamonds (��) I'm pretty sure I need to set the locale but I can't find a straight forward answer on how to do this properl... |
Setting the locale is documented in the Debian install guide - there's an appendix which provides some hints on installing directly with debootstrap and configuring the system yourself.
To configure your locale settings to use a language other than English, install the locales support package and configure it. Curren... | Setting locale in a systemd-nspawn container (debian jessie) |
1,576,378,419,000 |
I have a systemd-nspawn container in which I am trying to change the kernel parameter for msgmnb. When I try to change the kernel parameter by directly writing to the /proc filesystem or using sysctl inside the systemd-nspawn container, I get an error that the /proc file system is read only.
From the arch wiki I see t... |
$ cat /proc/6211/status | grep -i Cap
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: 00000000fdecafff
CapAmb: 0000000000000000
CapInh is the set of inheritable capabilities, which is not useful for the current program, but could be passed on to any programs this process would exec(... | How to increase kernel parameter (`msgmnb`) for a systemd-nspawn container |
1,576,378,419,000 |
I want to change passwd of root of nspawn container, as I am creating container via ansible just after I created rootfs, as at very first it doesn't have any root password.
is it a good idea to change passwd by using replace module to replace root line in /etc/shadow file ?
is there any other way too to update the pas... |
passwd works for this case. It has an option --stdin. Do not use echo my-secret-password | passwd --stdin, because echo my-secret-password may become visible if someone runs ps, or maybe even in a log file if you are unlucky.
#!/bin/sh
PASSWORD=...
passwd root --stdin <<EOF
$PASSWORD
EOF
| non-interactive password change of nspawn container |
1,368,521,572,000 |
I used a system information utility to take the model number of a system, and also of the motherboard.
DMI System Manufacturer LENOVO
DMI System Product 2306CTO
DMI System Version ThinkPad X230
DMI Motherboard Product 2306CTO
Is there a way to get model number, in this case 2306CTO, in Lin... |
using the dmidecode | grep -A3 '^System Information' command. There you'll find all information from BIOS and hardware. These are examples on three different machines (this is an excerpt of the complete output):
System Information
Manufacturer: Dell Inc.
Product Name: Precision M4700
System Information
Ma... | How can I find the hardware model in Linux? |
1,368,521,572,000 |
Often times I will ssh into a new client's box to make changes to their website configuration without knowing much about the server configuration. I have seen a few ways to get information about the system you're using, but are there some standard commands to tell me what version of Unix/Linux I'm on and basic system ... |
If I need to know what it is say Linux/Unix , 32/64 bit
uname -a
This would give me almost all information that I need,
If I further need to know what release it is say (Centos 5.4, or 5.5 or 5.6)
on a Linux box I would further check the file /etc/issue to see its release info ( or for Debian / Ubuntu /etc/lsb-rele... | How can I tell what version of Linux I'm using? |
1,368,521,572,000 |
How can I check what hardware I have? (With BIOS version etc.)
|
If your system supports a procfs, you can get much information of your running system. Its an interface to the kernels data structures, so it will also contain information about your hardware. For example to get details about the used CPU you could cat /proc/cpuinfo
For more information you should see the man proc.
Mo... | Getting information on a machine's hardware in Linux |
1,368,521,572,000 |
While troubleshooting a problem with my ethernet card, I've found that the driver I'm currently using may have some issues with old kernel versions. What command can I use to check the kernel version I am currently running ?
|
You can execute:
uname -r
It will display something like
3.13.0-62-generic
Found on https://askubuntu.com/questions/359574/how-do-i-find-out-the-kernel-version-i-am-running (view that QA to learn other commands you could use)
| How do I check the running kernel version? |
1,368,521,572,000 |
I'd like to price some new RAM for our in-house VMware testing server. It's a consumer box we use for testing our software on and running business VMs.
I've forgotten what kind of RAM it has and I'd rather not reboot the machine and fire up memtest86+ just to get the specs of the RAM.
Is there any way I can know what ... |
You could try running (as root) dmidecode -t memory. I believe that's what lshw uses (as described in the other Answer), but it provides information in another form, and lshw isn't available on every linux distro. Also, in my case, dmidecode produces the Asset number, useful for plugging into Dell's support web site... | Can I identify my RAM without shutting down Linux? |
1,368,521,572,000 |
I'm writing a program that displays various system information (on a CentOS system). For example, the processor type and speed (from /proc/cpuinfo), the last boot time (calculated from /proc/uptime), the IP address (from ifconfig output), and a list of installed printers (from lpstat output).
Currently, several piece... |
I just checked on my CentOS 5 system - after:
chgrp kmem /usr/sbin/dmidecode
chmod g+s /usr/sbin/dmidecode
It is still not possible to get dmidecode working - the group kmem has only read-rights for /dev/mem - it seems there is a write involved to get to the BIOS information.
So some other options:
Use sudo
Use othe... | How to get dmidecode information without root privileges? |
1,368,521,572,000 |
On OS X, I get a nice human readable system memory reading like so:
printf -v system_memory \
"$(system_profiler SPHardwareDataType \
| awk -F ': ' '/^ +Memory: /{print $2}')"
echo "$system_memory"
prints out the friendly:
4 GB
Although this on Linux is correct:
lshw -class memory
it outputs:... |
If that's all you need, just use free:
$ free -h | gawk '/Mem:/{print $2}'
7.8G
free returns memory info, the -h switch tells it to print in human readable format.
| Human readable system memory reading from CLI? |
1,368,521,572,000 |
I have always found it difficult to find information about the system itself in Unix, whether it be
Which OS I am using (version number and all, to compare it with the latest available builds)?
Which Desktop Environment am I using? If I am using KDE, most of the programs begin with a K and I can say I am using KDE, b... |
In addition to uname -a, which gives you the kernel version, you can try:
lsb_release -idrc # distro, version, codename, long release name
Most Desktop Environments like GNOME or KDE have an "about" or "info" menu option that will tell you what you use currently, so no commandline needed there really.
| How to find information about the system/machine in Unix? |
1,368,521,572,000 |
I want the UNIX date to output:
So this is week 35 of 2016.
Here, of course, 35 and 2016 are outputs of the date command. I have tried the following:
date +%U
This printed out the current week number. But I have to wrap it inside the specific text I want to display. I tried:
date "So this is week: %U"
date "It is c... |
The entire format string is to be preceded by the +:
$ date +"So this is week: %U"
So this is week: 19
$ date +"So this is week: %U of %Y"
So this is week: 19 of 2016
| How to use the 'date' command to display week number of the year? |
1,368,521,572,000 |
Does the hard drive need to be accessed or is everything done in memory? Basically I would like to constantly get updated values from meminfo and cpuinfo.
Do I need to reopen the file and then reread in order to get an updated value or can I just reread? I don't have access to a Linux install at the moment.
|
When you read from /proc, the kernel generates content on the fly. There is no hard drive involved.
What you're doing is similar to what any number of monitoring programs do, so I advise you to look at what they're doing. For example, you can see what top does:
strace top >/dev/null
The trace shows that top opens /pr... | What happens when I open and read from /proc? [duplicate] |
1,368,521,572,000 |
I am trying to overclock my machine. All the changes are made on the BIOS level, but then one needs to check all the temperatures, voltages, etc and test the stability of the overclock. Most tutorials (if not all) are written for Windows. What would be Linux alternatives for:
CPU-Z: to display all the CPU information,... |
For CPU-Z I can't really say (/proc/cpuinfo doesn't give core speed, multiplier etc...).
For hardware monitoring the sensors command (part of the lm_sensors package) should work; it doesn't have a GUI per se, however.
Finally, the stresslinux distro has many stress-testing utilities.
stresslinux makes use of some uti... | Overclocking tools in Linux |
1,368,521,572,000 |
I am trying to find out specifics about caches (in particular which caches are shared between cores and which are not) and have stumpled onto a inconsistency.
sudo lshw says
*-cache:0
description: L1 cache
physical id: a
slot: Internal Cache
size: 64KiB
capacity: 64KiB
capabilities: synch... |
Thank you for adding the extra information about the processor to your question. It helps to know that the examples you posted refer to an Intel Core i7-920 Processor.
The information provided by lscpu is more accurate because it includes all three levels of cache, L1, L2, and L3. It appears that lshw was only minimal... | lshw and lscpu disagree on caches - which is right? |
1,368,521,572,000 |
Is there a way to find out if and in case which linux security LSM (apparmor, selinux, grsecurity) is used by the kernel?
To be more specific let's assume I am a legimate root user of the machine?
If information available also it would be nice to furthermore know:
With regard to the question, is there a difference wit... |
Yes you can check /sys/kernel/security what's available.
See also dmesg or /proc/cmdline for boot settings.
If your config.gz available then
zgrep CONFIG_SECURITY /proc/config.gz
else
grep CONFIG_SECURITY /boot/config-`uname -r`
| How to determine if and which linux security module (LSM) is available? |
1,368,521,572,000 |
My inspiration for asking this is this other question on Ask Ubuntu.
One reason I am asking is that I am just curious. I would like to know more about this for whatever value it might have in the future.
But I would also like to know so that I have a procedure I can ask a user to perform when I am wondering WTF might... |
A system can have a UEFI firmware and still boot OS in legacy BIOS mode. In that situation there is no way for the booted OS to determine if the hardware is actually capable of UEFI, because BIOS isn't forward compatible with UEFI.
You can still look at firmware interface if anything is related to UEFI, but that is ve... | Is there a command or method (other than RTFM) to determine if a system has a UEFI BIOS? |
1,368,521,572,000 |
I am writing an application that works like Neofetch when a -w option is passed. It shows some of the the system information like memory, swap, cpu, battery usages, hostname, local ip, kernel version etc.
I am wondering how to get the "Host" like in Neofetch. For example:
-` soura... |
There is no a portable, reliable, generic method to retrieve hardware
model name in Linux. Let me describe 2 different cases: ARM-based
Raspberry Pi with Raspbian installed and MIPS-based TP-LINK router
with OpenWRT installed.
Raspberry Pi has an ARM CPU and ARM devices commonly use
device-tree to describe hardware a... | Get the hardware model name in linux |
1,368,521,572,000 |
Running:
cat /sys/devices/virtual/dmi/id/{sys_vendor,chassis_vendor,product_name} produces the output:
To Be Filled By O.E.M.
To Be Filled By O.E.M.
To Be Filled By O.E.M.
How would I change these values? I know it can be done through the registry in Windows, so hopefully there's a similarly simple way in Linux.
Edit... |
BIOS writers provide tools to update the DMI information, without needing to modify BIOS images, to companies which manufacture devices using those BIOSs. For example, AMI has a AMIDEDOS tool under DOS, or AMIDEWIN or DMIEdit for Windows (there used to be an AMIDELNX for Linux but that is no longer provided). These to... | How to change OEM vendor info? |
1,368,521,572,000 |
Is there any way, in Python 3, to find out the language used by the system?
Even a tricky one though, like: reading from a file in a sneaky directory, and finding the string 'ENG' or 'FRE' within the file's content…
|
Unix systems don't really have a “system language”. Unix is a multiuser system and each user is free to pick their preferred language. The closest thing to a system language is the default language that users get if they don't configure their account. The location of that setting varies from distribution to distributi... | How to find system language within Python? |
1,368,521,572,000 |
How can I tell if floating point arithmetic is performed in hardware or software?
I could find the processor's name and Google it, but is there a way to do it in a BASH script? For instance, is there something saved in a system file that I could read?
UPDATE:
output of /proc/cpuinfo on Intel:
processor : 0
vend... |
Well, you can tell if your CPU has FPU capabilities with the data stored in
/proc/cpuinfo and filter it with grep fpu
$ grep "fpu" /proc/cpuinfo
fpu : yes
fpu_exception : yes
flags : fpu vme de pse ...
And for info, what type of CPU are you playing with? :)
EDIT
for ARM proc, look for vector floating poin... | How can I tell if floating point arithmetic is performed in hardware or software? |
1,368,521,572,000 |
Possible Duplicate:
What do the flags in /proc/cpuinfo mean?
I tried installing CentOS 6.3 on my computer only to see a complaint that my computer doesn't have PAE. I am not sure if my computer has it and it's just disabled or if it doesn't have PAE at all.
I am using Mageia 2 right now and I want to check if I ca... |
When you examine the contents of /proc/cpuinfo, the flags for the CPU will include "pae".
| How do I find out if my computer has PAE using Linux? [duplicate] |
1,368,521,572,000 |
I'm wondering what is the best way to manually generate a hardware key based on certain components of the machine.
Here's the thing: I want only certain type of machines to be able to communicate with my server. In order to do that, I'd like to make sure that their hardware is just part of the "allowed hardware" that ... |
Interesting problem which I would think is going to bite you in the end.
You can do a script that will do the following:
rm /tmp/hw_snapshot
touch /tmp/hw_snapshot
cat /proc/cpuinfo | grep <whatever> >> /tmp/hw_snapshot
dmidecode | grep <whatever> >> /tmp/hw_snapshot
lspci | grep <whatever> >> /tmp/hw_snapshot
md5sum ... | Generate a key (number?) based on part of the machine's hardware components |
1,368,521,572,000 |
Are there any commands that I can use on a secondhand laptop or PC running Linux that will tell me if there are any problems with the system? If so, what are they?
For example, battery life/condition, hard drive space, bad sectors, bad RAM, bus speed, video/audio hardware and driver specs, LAN card specs, etc., etc.
|
Lets go from top to bottom, this guide is not distro specific (most of these commands will be available on most distros either out of the box, or through the package repositories) first you probably want to get the rough lay of your hardware specs. For this you have a couple options:
All in one options:
inxi --admin -... | How can I test a used computer for problems? |
1,368,521,572,000 |
One way to find the names is to look at /home/ and see whichever entries are on the system.
To look at current users one can use
#users
to see how many users are there.
If a single user has spawned many sessions you will get something like -
root@debian:~# users
shirish shirish shirish shirish shirish shirish shi... |
There are several ways. last, who and ps are all relevant here. last is the most thorough for tracking current and past logins.
From the man page for last (emphasis added):
Last will list the sessions of specified users, ttys, and hosts, in
reverse time order. Each line of output contains the user name, the... | How to find out names and numbers of users on your system? |
1,368,521,572,000 |
What command line utilities come standard with sunos to do system monitoring?
I've been able to find prstat, but I would like something that will tell me memory usage and IOWAIT as well.
It looks like this particular machine uses sunos 5.8
|
There are plenty of monitoring CLI commands with Solaris. They are easy to find as almost all share the stat suffix:
vmstat
mpstat
iostat
netstat
lockstat
nfsstat
prstat
busstat
cpustat
kstat
sar
swap
kstat (or the equivalent netstat -k) provides all of the kernel statistics in raw form.
About the IOWAIT statistic, ... | system monitoring tools |
1,368,521,572,000 |
I am currently trying to use Plink to run a few commands on a linux server to monitor a couple of things on it such as the disk space, memory, cpu usage.
I have the commands that I want to use but I want to format the output that I get to something a little friendlier to read.
This is the commands I am using inside m... |
This can be achieved by adding echo "" in the middle of the commands where the space is required.
Here are some example.
Adding new line in the middle.
Example:
df | fgrep '/dev/'; echo ""; free -h
output
tmpfs 16334344 55772 16278572 1% /dev/shm
tota... | Format the output of commands |
1,368,521,572,000 |
I'm wondering what command I can use to see all the hardware in any PC, or at least some of it (for example, model of the motherboard).
I'm pretty new on Linux, I'm using a lightweight version to boot in computers that I had to make a format, and previous back-up.
Some of these PCs are old, or with a very specific h... |
lshw uses a variety of sources to provide a comprehensive list of the hardware in a system. You should run it as root to get as much detail as possible.
| What is the command to list specific hardware components? [duplicate] |
1,368,521,572,000 |
I would like to fingerprint some Unix (most are Debian) systems. By fingerprinting I mean run a script that collect material identifiers, system version, etc in order to be able to:
accurately identify machines
discriminate hardware and software modification over machines
I know that a can use couple of commands to... |
On Debian-derived systems, for hardware information use lshw, hwinfo, udevadm, hdparm, inxi (this one needs installing first) etc. To accurately identify machines you may try to use the system serial number, vendor, model, the MAC address of the network controllers, the serial number of the hard disk etc. (You may onl... | How to fingerprint a Unix System [closed] |
1,368,521,572,000 |
Background
There's a task to automate info grabbing from servers. However, I am unable to locate any hardware or software RAID controllers.
Issue
Due to the various ways each vendor describes its controller, I am struggling to clearly define which block devices shown are RAID.
I assume the best way to resolve this is... |
Due to there are many differences from vendor to vendor (and within the vendor) the way I choose is using two main instruments: lspci and dmesg by grepping RAID. So, firstly I use the lspci command and, if it doesn't return sought output, I run dmesg with the same grepping. That way is working for now for more than 20... | Is there a way to clearly define hardware controller? |
1,368,521,572,000 |
When I visit a page like https://www.whatismyip.com it displays
the following:
Browser Info
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0
I am using Linux Mint 17.1 cinnamon 64-bit wih Firefox 46.0
Linux-Kernel: 3.13.0-37-generic
What could be next steps to investigate this behavior?
|
Websites get your browser type and OS information from the user agent string presented by your browser. In your case, start firefox. On the URL box, type about:config and search for useragent. You will see few entries. One of those is responsible for presenting your OS as a windows OS.
| Wrong operating system gets displayed online |
1,368,521,572,000 |
I want to find the following information for devices in Linux:
Bus speed (e.g. 66 MHz)
IRQ settings
Vendor identification
AGP rate (e.g. 1x, 2x, 4x)
MAC address
I am only able find the last one by /sbin/ifconfig | grep HWaddr
How can I find this information in Linux?
|
Use lspci as root with different verbosities (-v to -vvv); the most verbose setting will show bus speeds and IRQ (I don't know about the AGP rate - no machines with AGP graphics here).
E.g.
lspci:
06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 06... | How to find information about devices in Linux [duplicate] |
1,484,227,764,000 |
I have a number of servers to SSH into, and some of them, being behind different NATs, may require an SSH tunnel. Right now I'm using a single VPS for that purpose. When that number reaches 65535 - 1023 = 64512, and the VPS runs out of ports to attach tunnels to, do I spin up another VPS, or do I simply attach an addi... |
You most certainly can have multiple processes listening on the same port if they are bound to different IPs.
Here's a demonstration using nc:
% nc -l 127.0.0.1 1234 &
[1] 24985
% nc -l 192.168.1.178 1234 &
[2] 24988
% netstat -an | grep 1234
tcp4 0 0 192.168.1.178.1234 *.* LISTEN ... | Can I have a single server listen on more than 65535 ports by attaching an IPv4 address |
1,484,227,764,000 |
I am testing my Debian Server with some Nmap port Scanning. My Debian is a Virtual Machine running on a bridged connection.
Classic port scanning using TCP SYN request works fine and detects port 80 as open (which is correct) :
nmap -p 80 192.168.1.166
Starting Nmap 6.47 ( http://nmap.org ) at 2016-02-10 21:36 CET... |
Albeit TCP and UDP are part of TCP/IP, both belong to the same TCP/IP or OSI layers, and both are a layer above IP, they are different protocols.
http://www.cyberciti.biz/faq/key-differences-between-tcp-and-udp-protocols/
Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) are
two of the core prot... | ICMP : Port unreachable error even if port is open |
1,484,227,764,000 |
So I have an IP Address 5x.2x.2xx.1xx I want to map to localhost. In my hosts file I have:
cat /etc/hosts
127.0.1.1 test test
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allr... |
/etc/hosts can be used if you want to map a specific DNS name to a different IP address than it really has, but if the IP address is already specified by the application, that and any other techniques based on manipulating hostname resolution will be useless: the application already has a perfectly good IP address to ... | How to map an IP address to localhost |
1,484,227,764,000 |
I'm trying to connect directly (without 3rd party server) my computer to a friend's computer. We are both behind a ISP router, and would like (as a challenge!) to connect without modifying the router configuration.
As suggested here and here, we tried both TCP hole punching:
myself$ nc -p 7777 public-ip-friend 8888
fr... |
Sometimes the commands given in the question will work, but sometimes it won't.
Here is the reason.
Let's say:
my computer IP on my local network: 192.168.1.10
my home public IP: 203.0.113.10
my friend's public IP: 198.51.100.27
When doing this on my computer:
myself$ nc -u -p 7777 198.51.100.27 8888
we have, bef... | UDP or TCP hole punching to connect two peers (each one behind a router) |
1,484,227,764,000 |
telnet 8.8.8.8 8888
displays
Trying...
I was expecting, that this directly is refused.
Background: When we have a NGINX reverse proxy server, it would be great, that it detects directly when the backend is not there.
|
The TCP stack decides how to respond to a connection, based on a set of rules (it could be at the firewall level). You can REJECT the connection package (SYN), but you can also DROP it. Dropping it makes sense because of port scanning, for example.
| Why does telnet on a non existent port not directly reject, but time out? |
1,484,227,764,000 |
How do I configure Docker containers to have unique IP addresses that are not the default ones?
The Docker containers will run Apache or some web service. These Docker containers will share one host that has one physical NIC. These containers must be identifiable by unique IP addresses with calls over port 80. Work... |
The easiest solution here is to add additional addresses to the host, and then bind one container to each address. For example, assuming that your host is 192.168.1.20, you could add additional addresses like this:
ip addr add 192.168.1.21/32 dev eth0
ip addr add 192.168.1.22/32 dev eth0
ip addr add 192.168.1.23/32 d... | How do I configure Docker containers to have unique IP addresses that are not the default ones? |
1,484,227,764,000 |
I can't figure out why the tcp_adv_win_scale
and tcp_app_win variables coexist in Linux.
The information from tcp(7) says:
For tcp_adv_win_scale:
tcp_adv_win_scale (integer; default: 2; since Linux 2.4)
Count buffering overhead as bytes/2^tcp_adv_win_scale, if
tcp_adv_win_scale is greater than 0; or
bytes-bytes/2^(... |
I found this information that talks about tcp_adv_win_scale. The page is titled: TCP performance tuning - how to tune linux.
excerpt
TCP performance is limited by latency and window size (and overhead, which
reduces the effective window size) by window_size/RTT (this is how much data
that can be "in transit" over... | What does net.ipv4.tcp_app_win do? |
1,484,227,764,000 |
I am setting up an Arch/Manjaro-based machine that only occasionally will be connected to network. I.e. most of the time its Ethernet card is disconnected.
I run into this curious problem - when I try to use networking commands the interface is down (I sit next to it with my laptop that has a Wi-Fi Internet connection... |
Like this for example:
For a static IP configuration copy the
/etc/netctl/examples/ethernet-static example profile to /etc/netctl
and modify Interface, Address, Gateway and DNS) as needed.
For example:
/etc/netctl/my_static_profile
Interface=enp1s0
Connection=ethernet
IP=static
Address=('10.1.10.2/24')
Gateway=(... | How do I set a static IP address for a disconnected interface? |
1,484,227,764,000 |
I have a server running on my Linux box, also on which the following commands were run:
$ cat /proc/sys/net/ipv4/tcp_keepalive_time
7200
$ cat /proc/sys/net/ipv4/tcp_keepalive_intvl
75
$ cat /proc/sys/net/ipv4/tcp_keepalive_probes
9
My server listens on port 58080, and I create a connection on it having set TCP keep... |
After discussion with a super-smart colleague, we think we have figured out what's wrong, but are yet to prove this. What is likely happening is that the keep-alive interval is only taken into account when no keep-alive ACK is received. So after 2 hours, if no ACK was received to this first keep-alive packet, a seco... | TCP keep-alive parameters not being honoured |
1,484,227,764,000 |
I have two Ethernet-wired connected devices. I gave to both of them address from same sub-network. As result I can see second device in arp-table of the first.
$ arp -a
? (128.247.77.90) at 10:60:4b:4b:29:50 [ether] on eth0
But ping always fails.
$ ping 128.247.77.90
PING 128.247.77.90 (128.247.77.90) 56(84) bytes of... |
The problem was with configuration of tftpd-hpa server on host.
According to guide the file /etc/default/tftpd-hpa must be something like:
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/home/bogdan_liulko/tftp"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure --create"
RUN_DAEMON="yes"
My problem was that my file didn't cont... | ICMP - Destination unreachable (Port unreachable) |
1,484,227,764,000 |
I am monitoring a certain port, because my application uses that port, it seems that the connection drops at random times, I want to see what are the last packets passing through before the connection drops:
I used this line
sudo tcpdump -XX -i eth0 port 3050 | tail >> tcpamir.txt
but for it to work I have to start... |
Ok I think I've found a solution:
sudo tcpdump -XX -i eth0 -w tcpamir-%s.txt -G 10 port 3050
This rotates your output file every 10 seconds to a new file called tcpamir-<unixtimestamp>.txt
You can also modify the output file, so it overwrites itself every day, if you are worried about the pending file size. For more ... | "tcpdump" to capture the last packets |
1,484,227,764,000 |
This question is a follow-up to my previous question.
Logic for me to says that an in-kernel firewall sits between the network access layer and the Internet layer, because it needs to have access to the IP-packet header to read the source and destination IP address in order to do filtering before determining if the p... |
A firewall does not exist in a single place in the kernel network stack. In Linux, for instance, the underlying infrastructure to support firewall functionality is provided by the netfilter packet filter framework.
The netfilter framework in itself is nothing more than a set of hooks at various points in the kernel p... | Does an in-kernel firewall sit between the network access layer and Internet layer? |
1,484,227,764,000 |
I was reading an article on how to sniff network packets. (of course for knowledge purposes only). I came across these particular lines.
For instance, say I was sniffing traffic on the network, and you
logged in to Facebook and left the Remember Me On This Computer check
box checked. That signals Facebook to sen... |
If the machine is compromised, everything you typed in when logging in (such as your username and password) can be compromised, so "Remember me" doesn't really matter anymore.
But even if we stick to cookies only, the hacker can extract the session cookies from the browser's profile and then use them in his browser.
E... | Is it bad to select remember me option in the browsers of a compromised machine? |
1,484,227,764,000 |
The environment is FreeBSD for the most part and looks like this:
HOST_A <-> ROUTER <-> LOKI <-> HOST_B
Minimally, I would like to be able to ping ROUTER from HOST_B.
ROUTER is assigned the IP 10.0.0.1
LOKI is a multi-homed machine that is assigned IPs 10.0.0.2 and 192.168.200.1
HOST_B is assigned the IP 192.168.200... |
Why are LOKI and HOST_A connected by a router when they are on the same subnet? Is it really a router, or is it just a switch? (From your later comments, although the device is a router, it is just acting as a switch between LOKI and HOST_A).
What is the routing table on HOST_A and ROUTER? If it were to try to reac... | Unable to figure out how to route a packet through a multi-homed nic |
1,484,227,764,000 |
I'm using a PPP to communicate with a device. So far what I have been doing is instantiating PPP on my machine (Fedora 29) and on the device (Yocto Linux). Then I open a TCP/UDP socket and communicate with the device. My serial link (which is why I use PPP) has low baud rate, 4800 to be exact. I cannot change it, it i... |
PPP can run protocols other than IP; the most common is of course IPv6. But numerous others have been (and maybe still are) run over PPP. Wikipedia even has a list of protocols that run over PPP, though I'm not sure how many work on Linux.
Also — the reason you run PPP over a serial link is because you want to run a h... | using PPP without TCP/IP |
1,484,227,764,000 |
I need to edit 1 line in /proc/net/tcp while the file is also used by the linux kernel for updating other lines of it by the kernel.
Background: Each line in /proc/net/tcp represents a TCP socket. The kernel uses this file to show the state and statistics of each socket in the system. I want to fake the statisics of 1... |
/proc/net/tcp is not a real file, that can be edited. Each time you read from it, kernel allocates temporary buffer called a seq file, and writes statistics there from current in-kernel data.
You may only hjack that by changing code in tcp4_seq_show() in net/ipv4/tcp_ipv4.c and subsequent functions.
Note that /proc/... | How can I edit /proc/net/tcp? |
1,484,227,764,000 |
We can figure out number of connections in GNU\Linux with ip_conntrack module, And I can print current connections and maximum of connections with:
root@debian:/home/mohsen/test/shell# sysctl net.ipv4.netfilter.ip_conntrack_count
net.ipv4.netfilter.ip_conntrack_count = 28
root@debian:/home/mohsen/test/shell# sysctl ne... |
You set options in pfctl.conf with a set limit { ... } statement.
You can modify the packet filter state while it is running by passing the `-m' (merge) option to pfctl(8), ie
FreeBSD 9.3-RELEASE-p10 (GENERIC) #0: Tue Feb 24 21:28:03 UTC 2015
# pfctl -sm
No ALTQ support in kernel
ALTQ related functions... | ip_conntrack and FreeBSD |
1,484,227,764,000 |
for studying purposes about TCP/IP, we should run a DNS server, i did the advised configuration, the server is runing without any erros, but when i request the server for the configured domain name with dig or nslookup command, i get nothing.
Here are the settings:
system : centos 7.
installation of bind package :
yum... |
mydomaine.fr isn't associated with an IP address in your config.
You should add an A record that would associate it with the desired IP address.
$TTL 1D
mydomaine.fr. IN SOA ns1.mydomaine.fr. root.mydomaine.fr.(
0; serial
1D; refresh
1H; retry
1W; expire
3H; minimum
)
@ IN NS ns1.mydomaine.fr.
ns1... | My first Configuration DNS doesn't work or respond on centos |
1,484,227,764,000 |
I am a networking newb - ping cannot locate certain dns names, so I put them in /etc/hosts like this:
10.128.0.22 kafka.marathn.meso
10.128.0.31 elasticsearch.marathn.meso
and then ping can find them. Is there a more dynamic/scalable way to map the DNS names to an IP address, in case the IP address changes?
|
If this is a home lab, I would recommend setting up a DNS/DHCP server for a good learning exercise, as mentioned in the comment above by user1794469. This way, anytime the ip address is changed, the DNS record would be updated dynamically. The most important thing to do after that is to configure your client machines ... | Alternative to modifying /etc/hosts for dns lookup |
1,484,227,764,000 |
Are there standard sytem calls to send data to TCP? And back? How does TCP tell the application to send more or less?
|
TCP communication is done through sockets, which you create with the socket() system call. Sockets are file descriptors, to all of the ways of reading from and writing to file descriptors (plus some additional system calls specific to sockets) work for sockets, and that's how you send and receive data.
As with any oth... | How does tcp communicate back to the application? [closed] |
1,484,227,764,000 |
I need to change and test some TCP/IP network parameters on a Oracle Solaris 10 as a possible workaround for a bug in 'Oracle Hyperion EPM 11.2.1.0' in the development environment.
I am not a Solaris/UNIX expert so would appreciate any guidance to identify the correct parameters and also it would be very helpful if yo... |
For the first one:
ndd -set /dev/tcp tcp_time_wait_interval 90000
as per the oficial manualyou should not set this under 60000 = 60 seconds.
For the second one
ndd -get /dev/tcp tcp_smallest_anon_port tcp_largest_anon_port
No need to restart the network. But if you feel like it, in solaris 10 is
svcadm restart netw... | How do I safely perform the below changes to network parameters on Solaris 10? |
1,303,813,546,000 |
Is is possible to open a new-window with its working directory set to the one I am currently in. I am using zsh, if it matters.
|
Starting in tmux 1.9 the default-path option was removed, so you need to use the -c option with new-window, and split-window (e.g. by rebinding the c, ", and % bindings to include
-c '#{pane_current_path}'). See some of the other answers to this question for details.
A relevant feature landed in the tmux SVN trunk in... | How to create a new window on the current directory in tmux? |
1,303,813,546,000 |
Browsing through questions I found about tmux (I normally used GNU Screen). My question is what are pros and cons of each of them. Especially I couldn't find much about tmux.
|
From their website:
How is tmux different from GNU screen? What else does it offer?
tmux offers several advantages over screen:
a clearly-defined client-server model: windows are independent entities which
may be attached simultaneously to multiple sessions and viewed from multiple
clients (terminals), as well... | tmux vs. GNU Screen [closed] |
1,303,813,546,000 |
I've been using screen for years now as a way of ensuring that any remote work is safely kept open in after disconnects/crashes. In fact, as a matter of course, I use screens even when working locally.
Recently, my requirements have progressed to the stage that I switched to tmux because of the beauty of:
tmux attach ... |
Not according to the man page, which only calls out the attach -r option to enable read-only mode.
Also, in the source code, only the following line in cmd-attach-session.c sets the read only flag. The rest of the code checks whether this flag is set, but does not change its value. So again, it looks like you are out ... | Is there a tmux shortcut to go read only? |
1,303,813,546,000 |
Is it possible to change the background of the active (current) tmux tab?
I'm using tmux 1.9 on Ubuntu 15.04.
$ tmux -V
tmux 1.9
I tried to do:
set-option -g pane-active-border-fg red
But the result was not changed:
I expected the 3-bash* to have a red background.
|
You haven't set window active background color, you only set active panel border, try:
set-window-option -g window-status-current-bg red
| Set the active tmux tab color |
1,303,813,546,000 |
When working in a shell environment I run fairly often into the need to copy 'intermediate pipe output' around (eg. from/to already running editors, to other shells, other machines, etc.).
When in a windowing environment, an easy (and generic) method to solve this is often via the system clipboard, eg.:
X11: ... | xs... |
tl;dr
... | tmux loadb -
tmux saveb - | ...
Explanation & Background
In tmux, all copy/paste activity goes through the buffer stack where the top (index 0) is the most recently copied text and will be used for pasting when no buffer index is explicitly provided with -b. You can inspect the current buffers with tmux... | How to copy from/to the tmux 'clipboard' with shell pipes? |
1,303,813,546,000 |
I've decided to try tmux: have been reading the docs and googling around, trying to find a way to have two users sharing a session, each with a different cursor.
However, giving 777 permissions to the socket, or creating a group, chgrping the socket and adding both users to it, seems to let that same socket be used to... |
This question is a bit old, but I was looking for something similar, and found it here. It creates a second session that shares windows with the first, but has its own view and cursor.
tmux new-session -s alice
tmux new-session -t alice -s bob
If the sharing is happening between two user accounts, you may still have... | tmux: shared session, one user in a pane, another in another pane, two different cursors |
1,303,813,546,000 |
I find even Ctrl+b to be very emacs like but I understand the point. I'm wondering if I could bind it to a single keypress of a key I don't other wise use? namely Super_L (also known as the left windows key. for why I say Super_L start xev in a terminal and press that key)
|
Super_L is an X keysym. Tmux runs in a terminal. It is up to your terminal emulator to transform a keysym into a character sequence. So you would have to configure both your terminal emulator and tmux.
Looking at the tmux documentation, the prefix can only been a known key name with an optional modifier. So you can se... | How do I bind the tmux prefix to a Super? |
1,303,813,546,000 |
Both terminal multiplexers (screen, tmux) and keyboard-driven tiling window managers (ratpoison, dwm, xmonad) provide similar functionality. Is there any benefit in using both at the same time? What about problems that may arise?
|
I use dwm and tmux. Before learning to use tmux, I would have multiple terminals open for different things, and have them in different tags. Now I can run everything inside of one tmux session, under a single tag, and can detach and reattach without losing state if I need to restart X.
| Does a terminal multiplexer have any benefit when used with a tiling window manager? |
1,303,813,546,000 |
So let's say you boot up your Linux install all the way to the desktop. You start up a gnome-terminal/konsole/whatever so you have a tty to enter commands to.
Now let's say I SSH into that same machine. It will bind me to another tty to enter commands to.
Now let's say I want to "switch" my tty from my original SSH ... |
Maybe these schema can clarify the situation.
This is the usual setting:
Terminal (/dev/ttyX or /dev/pts/x)
device
|
(screen)<--[<output]----x-------(stdout) Process1
Terminal (keyboard)---[... | How can I switch between ttys without using screen? |
1,303,813,546,000 |
I'm trying to make an ssh connection (via lsh) from one Ubuntu host to another from within screen. If I try to run mc right after that I get the following error:
Unknown terminal: screen-256color-s
Check the TERM environment variable.
Also make sure that the terminal is defined in the terminfo database.
Alternatively,... |
Finally, I've managed to figure out "obvious" package which supply screen-256-color-s (got to be installed on remote machine):
sudo apt install ncurses-term
fixed the problem for me: nice 256 colors and no need for ugly workarounds with environment variables. Hooray! :)
| ssh from screen leads to unknown terminal error |
1,303,813,546,000 |
I use the screen Screen visual consoles.
To detach a screen I need to press Ctrl+A followed by D but some time a session is closed without detaching it.
It appears as (Attached) on screen -list:
eduard@eduard-X:~$ screen -list
There are screens on:
4561.pts-46.eduard-X (30.03.2015 14:48:51) (Attached)
... |
Sure, with
screen -d -r
You can choose which screen to detach and reattach as usual by finding the pid (or complete name) with screen -list.
screen -d -r 12345
| How can I resume a screen that I did not manage to detach? |
1,303,813,546,000 |
What distinguishes kitty from the vast majority of terminal emulators?
It offers GPU-acceleration combined with a wide feature set. It’s
targeted at power keyboard users. It’s billed as a modern, hackable,
featureful, OpenGL based terminal emulator.
What are the advantages of hardware-accelerated terminal emulators?... |
They can potentially be faster at outputting and refreshing vast amounts of information. It could also allow for smooth(er) scrolling. Human beings however are quite slow at reading this information, so I'm kinda doubtful this can be beneficial - the average person is unlikely to be able to comprehend it anyways. CPU ... | What are the advantages of hardware-accelerated terminal emulators? |
1,303,813,546,000 |
For example. What is the difference between a default 'interface/console' of FreeBSD/archlinux, vs Terminal, vs Terminal emulator like Xterm, vs Terminal multiplexer like tmux, vs Window manager like awesome; and where does Bash and other 'shells' fit in all this?
|
A terminal emulator provides a standardised character based interface for text mode applications, it emulates the behavior of real or idealised hardware.
Consoles typically run some sort of terminal emulation, (linux console emulates a VT220 with some additions)
A terminal was dedicated hardware that implements the s... | What is the difference between a Console, Shell, Terminal, Terminal emulator, Terminal multiplexer, and a Window manager? |
1,303,813,546,000 |
Scrollability of text in some terminals:
| tty | xterm | urxvt | guake | terminator
screen | Y | Y | Y | Y | Y
tmux | N | N | Y | N | N
I notice in this answer that scrolling doesn't work when using tmux. But I can scroll in urxvt. How can I have that behaviour in other te... |
Add set -g terminal-overrides "xterm*:smcup@:rmcup@" to your tmux config and restart tmux. If you are not using a terminal matching 'xterm*' you'll have to change it of course.
| Scrollability of text when using tmux? |
1,303,813,546,000 |
I want to run streamripper in its own X Terminal (window), then split the terminal horizontally, and then run mplayer in the lower half.
This is simple enough to do manually, but getting a script to do it eludes me.
start a new terminal window
run streamripper http://radio.net:8000 -r 8000
split the terminal windo... |
Although some terminal programs have support for splitting, you won't be able to access this functionality from the shell which is running in a different layer and doesn't have access to the software displaying it.
What you can do is use a terminal multiplexer such as GNU Screen or tmux that allow you to run multiple ... | How to run streamripper and mplayer in a split-screen X terminal, via a single script |
1,303,813,546,000 |
I use screen to connect to devices via RS232 with a USB-serial dongle. Currently, I use this command to invoke screen (where 115200 is my baud-rate):
screen /dev/ttyUSB0 115200
Usually, I have more than one device (/dev/ttyUSB0 and /dev/ttyUSB1). Sometimes their baud-rate differs. Currently, I open a new terminal emu... |
Once you've launched screen, you can use its internal screen command to attach windows to additional terminal devices. Type C-a: to get the prompt, then use
screen /dev/ttyUSB1 ######
where ###### is this device's baud-rate. You can also put these commands in your .screenrc to attach the devices automatically when yo... | Multiplex different TTYs with a single instance of screen |
1,303,813,546,000 |
Is there a way to set different $TERM for different terminal emulators. For example if I am in xterm the $TERM will read xterm-256color, in urxvt urxvt-256color, in sakura xterm-256color and in tmux screen-256color.
|
There is no general method. As observed by vinc17, different terminal emulators let you configure the TERM value in different ways, if at all.
You can drop terminfo configuration files into your home directory, organized as ~/.terminfo/INITIAL-LETTER/VALUE. For example, if you wish for xterm to point to the 256-color ... | Modular $TERM for different terminal emulators |
1,303,813,546,000 |
Using tmux to send commands along from one terminal to another, I realize that
$ tmux send -t mySession "text" ENTER
correctly sends text, but
$ tmux send -t mySession "up" ENTER
sends text again, probably because up is interpreted not as text, but as keyworded key up arrow.
Similarly,
$ tmux send -t mySession "3" E... |
To send a string literally you can use the -l option to send-keys, but as you might still have more options after the -l you need to use something like '' (an empty string) to no longer be looking for options beginning -.
You cannot mix and match the literal with keynames like Enter, so finally you need to give two co... | Escape keywords with tmux send |
1,303,813,546,000 |
From time to time I want to use vim as scratch pad for commands that I would like to send to a command line shell like psql (Postgres), ghci (Haskell programming language), octave ('calculator'), gnuplot (plot) etc.
The advantages would be that you could put comments next to command lines, directly document your sessi... |
Try vim-slime, an environment inspired by Emacs's SLIME mode. It sends the contents of Vim to a screen or tmux session.
In the future you can probably also use Xiki, but for now its Vim support is incomplete.
| How to configure vim to interact with interactive command line shells? |
1,303,813,546,000 |
Are there any Linux Terminal Emulators that offer "control & scroll zoom" (allowing you to adjust the visible size of fonts by holding down ctrl and scrolling your mouse-wheel)?
Recently on Windows I discovered ConEMU, which offers this feature and I'd love to enjoy it on my Linux desktops too.
Looks like Terminator i... |
Konsole has this feature by default.
I would like to know if any others did too, as it's a feature I use regularly to ease readablity.
| Terminal Emulator with CTRL+Scroll Zoom |
1,303,813,546,000 |
I am working in a remote Linux box using VNC.I have a single terminal with lots of tabs opened in my system. How can I split them using the screen utility? Does the screen utility work with already opened tabs or do I need to close all existing tabs to try it out ?
I have been through this answer but it is not workin... |
I read carefully your question and I have a simple obvious suspect: did you run screen?
Inside your "gnome-terminal", you have to run the screen program. After you'll start the program inside the terminal, you'd use ctrl+a c sequence to split your terminal.
| Why screen is not splitting my GNOME terminal? |
1,303,813,546,000 |
I am running a tmux session with 40 windows. I need to create an overview window listing the last line of each screen and updating each listing as the output of the respective window.
|
The idea is to enumerate all the windows, or rather all the panes, since a window can have several of them. Then capture the output of each pane and display the last line of captured text. Put this into a script:
tmux list-windows -F '#I' |
while read w; do tmux list-panes -F '#P' -t $w |
while read p; do ... | tmux - List output last line of all windows in new window |
1,303,813,546,000 |
I use tmux regularly to easily handle multiple terminals on my local machine. Sometimes, I need to connect to a remote machine and start a script in one the terminals (i.e. a pane or window in tmux). If my machine disconnects for any reason during this process, the remote script is killed and I cannot re-attach to the... |
One approach is to use a terminal multiplexer only on remote machines. Running each shell in a separate terminal emulator has the advantage that you can put multiple shell windows side by side. On a remote machine, resistance to disconnection is a big win that justifies terminal multiplexers, but locally, they have fe... | Combining local and remote terminal multiplexing |
1,303,813,546,000 |
As far as I've seen, pressing Ctrl-Z on any terminal multiplexer, or trying to start them in the background, does nothing or crashes.
I know that, in a sense, terminal multiplexers are a "replacement" for job control, and usually, they have their own mechanisms for suspending and resuming. Still, I was wondering if I ... |
Do you want to suspend a job inside a screen window?
Just use Ctrl z inside the screen window (as usual). This doesn't suspend screen, though.
Do you want to suspend screen itself?
Use Ctrl az inside any screen window. But notice that although this suspends the user-facing part of the screen application, it doesn't... | Does any terminal multiplexer (screen, tmux, zellij) support job suspension (Ctrl-Z) in Bash? |
1,303,813,546,000 |
With the screen command, the -X option allows you to execute a command in the specified screen session, but when you try to use it when creating a new screen, e.g:
screen -dmS -S downloader -X "wget https://google.com"
you get the error No screen session found.. So it's clear the the -X option only works for pre-exis... |
I found my answer, although it was under a different title and the question was slightly different, this does the job:
screen -d -S downloader -m wget https://google.com
It creates a new screen called downloader, detaches it and runs the command.
| Execute command when creating new screen session |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.