Most Popular
1500 questions
74
votes
2 answers
What does it mean to be "sh compatible"?
I've seen the phrase "sh compatible" used usually in reference to shells. I'm not sure if it also applies to the programs that might be run from within shells.
What does it mean for a shell or other program to be "sh compatible"? What would it mean…
Praxeolitic
- 1,638
- 3
- 18
- 24
74
votes
2 answers
linux + g++: command not found
I want to install on my Linux red-hat machine gettext-0.19.1.tar.xz.
First I do the following
cd gettext-0.19.1
./configure
make
During make it fails on g++: command not found
libtool: compile: g++ -DIN_LIBASPRINTF -DHAVE_CONFIG_H -I. -c…
maihabunash
- 6,973
- 19
- 64
- 80
74
votes
5 answers
Allow user1 to "su - user2" without password
I need to allow user martin to switch to user martin-test without password
su - martin-test
I think this can be configured in /etc/pam.d/su. There are already some lines in that file which can be uncommented. However, I don't like the idea of…
Martin Vegter
- 69
- 66
- 195
- 326
74
votes
3 answers
Using ip addr instead of ifconfig reports "RTNETLINK answers: File exists" on Debian
I have a Debian system working as a wireless router with eth0 and wlan0. Now I added an additional network manually on eth1 with ifconfig:
alix:~# ifconfig eth1 192.168.0.2 netmask 255.255.255.0
alix:~# netstat -rn
Kernel IP routing…
ceving
- 3,461
- 5
- 21
- 30
73
votes
2 answers
Sending messages to another user
Is there any command to send messages through the Linux shell to other people on the same network? I'm using write user and then write the message itself. But there's any command that doesn't show my username or that I'm trying to message them
The…
Ricardo Almeida
- 855
- 1
- 8
- 6
73
votes
4 answers
How to find the driver (module) associated with a device on Linux?
On Linux, given:
a device, for example /dev/sda,
and its major and minor numbers, for example 8, 0,
how can I know which module / driver is "driving" it?
Can I dig into /sys or /proc to discover that?
Totor
- 19,302
- 17
- 75
- 102
73
votes
5 answers
less command and syntax highlighting
I need to use the less command with the syntax highlighting of the vim command for python, C, bash and other languages.
How do I apply syntax highlighting colors according to vim colors for less command?
PersianGulf
- 10,728
- 8
- 51
- 78
73
votes
3 answers
What do the bash-builtins 'set' and 'export' do?
I am at a bit of a loss as to the purpose of set and export in Bash (and I guess probably other shells too).
I would think it is for setting environment variables, but that can be done just with VARIABLE=VALUE, right?
Also typing set and export on…
mydoghasworms
- 1,429
- 1
- 13
- 19
73
votes
9 answers
How to bind USB device under a static name?
I have an Arduino which sometimes gets bound to /dev/ttyUSB0 and other times to /dev/ttyUSB1, making my script fail.
I do not want to enumerate all the possibilities of where my device could be, but I'd rather have it be bound somewhere static, e.g.…
k0pernikus
- 14,853
- 21
- 58
- 79
73
votes
2 answers
Is there an easy way to update information in known_hosts when you know that a hosts key has changed?
If a host's operating system has been re-installed and had its public key regenerated sshing to it will of course fail because the new key doesn't match the old one.
Is there an easier way to tell ssh that you know that the host's key has changed…
Sam
- 973
- 2
- 7
- 9
73
votes
7 answers
Bluetooth won't turn On on Ubuntu 20.04
I recently installed ubuntu 20.04 and bluetooth seemed to work out-of-the-box. Yesterday, it stopped working with no known reason.
I can turn it ON but the settings still show it to be OFF.
I tried the following:
$ sudo -i
$ rfkill list
0: phy0:…
Pe Dro
- 1,399
- 1
- 7
- 14
73
votes
5 answers
Print file content without the first and last lines
Is there a simple way I can echo a file, skipping the first and last lines? I was looking at piping from head into tail, but for those it seems like I would have to know the total lines from the outset. I was also looking at split, but I don't see a…
user394
- 14,194
- 21
- 66
- 93
73
votes
6 answers
How do I cycle through panes inside a window in tmux like in screen?
I thought Moving tmux pane to window was the same question but it doesn't seem to be.
Coming from using GNU screen regularly, I'm looking for tmux to do the same things. On of the things I do regularly is have a couple of different windows open,…
FooBar
- 833
- 1
- 7
- 7
73
votes
7 answers
SSH inside SSH fails with "stdin: is not a tty"
I'm trying to connect to machine one with ssh and then connect to another machine two with ssh, but I get this error.
ssh [email protected] 'ssh [email protected]'
stdin: is not a tty
Why?
Jhonathan
- 3,525
- 4
- 24
- 23
73
votes
11 answers
How to stop the loop bash script in terminal?
For example,
#!/bin/bash
while :
do
sl
done
How to terminate this bash script?
Yinyanghu
- 843
- 1
- 7
- 5