Most Popular
1500 questions
257
votes
7 answers
List all connected SSH sessions?
I just SSH'd into root, and then SSH'd again into root on the same machine. So I have two windows open both SSH'd into root on my remote machine.
From the shell, how can I see a list of these two sessions?
themirror
- 6,898
- 11
- 31
- 36
257
votes
4 answers
How to enable diffie-hellman-group1-sha1 key exchange on Debian 8.0?
I am unable to ssh to a server that asks for a diffie-hellman-group1-sha1 key exchange method:
ssh 123.123.123.123
Unable to negotiate with 123.123.123.123 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1
How…
j1088099.mvrht.com.
- 2,903
- 3
- 13
- 20
256
votes
3 answers
Open `less` scrolled to the end
Is there a way to open less and have it scroll to the end of the file? I'm always doing less app.log and then pressing G to go to the bottom.
I'm hoping there's something like less --end or less -exec 'G'.
Miles
- 6,557
- 3
- 12
- 11
256
votes
11 answers
Allow setuid on shell scripts
The setuid permission bit tells Linux to run a program with the effective user id of the owner instead of the executor:
> cat setuid-test.c
#include
#include
int main(int argc, char** argv) {
printf("%d", geteuid());
…
Michael Mrozek
- 91,316
- 38
- 238
- 232
256
votes
3 answers
Linux "top" command: What are us, sy, ni, id, wa, hi, si and st (for CPU usage)?
When I issue top in Linux, I get a result similar to this:
One of the lines has CPU usage information represented like this:
Cpu(s): 87.3%us, 1.2%sy, 0.0%ni, 27.6%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
While I know the definitions of each of…
its_me
- 13,709
- 23
- 54
- 52
256
votes
10 answers
Getting 256 colors to work in tmux
I have 256 colors working just fine in konsole,. I thought I'd give tmux a try because, unlike screen, it seems to support vi mode. However I find that the colors of my prompt show up and this is most likely because I have a 256 color mode prompt.…
xenoterracide
- 57,918
- 74
- 184
- 250
256
votes
8 answers
Can I create a user-specific hosts file to complement /etc/hosts?
Is it possible to add a list of hosts that are only specific to a certain user? Perhaps a user-specific hosts file?
This mechanism should also complement the entries in the /etc/hosts file.
redspike
- 2,663
- 2
- 15
- 5
255
votes
20 answers
How can I add a signature .png to a PDF in Linux?
I have a scanned copy of my written signature and I need to apply it to some documents in the signature block. I used to do this on Windows all the time but I now have only Linux.
Is this possible? How can I add a signature image to a PDF file in…
Freedom_Ben
- 4,284
- 4
- 22
- 29
255
votes
6 answers
What does ` (backquote/backtick) mean in commands?
I came across the following command:
sudo chown `id -u` /somedir
and I wonder: what is the meaning of the ` symbol. I noticed for instance that while the command above works well, the one below does not:
sudo chown 'id -u' /somedir
gws
- 2,661
- 3
- 14
- 6
255
votes
9 answers
scp without replacing existing files in the destination
How do I copy an entire directory into a directory of the same name without replacing the content in the destination directory? (instead, I would like to add to the contents of the destination folder)
biznez
255
votes
4 answers
What does aux mean in `ps aux`?
ps aux seems to conveniently list all processes and their status and resource usage (Linux/BSD/MacOS), however I cannot comprehend the meaning of parameter aux using man ps.
What does aux mean?
Howard
- 5,149
- 5
- 30
- 34
255
votes
10 answers
Parallelize a Bash FOR Loop
I have been trying to parallelize the following script, specifically each of the three FOR loop instances, using GNU Parallel but haven't been able to. The 4 commands contained within the FOR loop run in series, each loop taking around 10 minutes.…
Ravnoor S Gill
- 2,653
- 3
- 12
- 4
254
votes
15 answers
How to fill 90% of the free memory?
I want to do some low-resources testing and for that I need to have 90% of the free memory full.
How can I do this on a *nix system?
Eduard Florinescu
- 11,153
- 18
- 57
- 67
254
votes
3 answers
Difference between cp -r and cp -a
I'm looking for the difference between cp -r and cp -a. What does "recursive" mean in terms of copying files from a folder?
Randy
- 2,649
- 2
- 14
- 4
253
votes
10 answers
What causes this green background in ls output?
There are two directories shown by 'ls'. Normally directories anywhere are blue on black background. But the first one is blue on green and impossible to read. Why is this? How to make it blue on black, or at least something light on something…
DarenW
- 3,353
- 5
- 18
- 21