Most Popular

1500 questions
94
votes
5 answers

How can I verify SSL certificates on the command line?

I'm trying to validate/verify that the rsa key, ca-bundle, and certificate stored here are ok. They are not being served by a webserver. How can I verify them?
xenoterracide
  • 57,918
  • 74
  • 184
  • 250
94
votes
6 answers

How to change top's sorting back to CPU?

A former coworker did something to top that whenever it runs as root the data is sorted by MEM usage instead of the default CPU usage. According to multiple searches, the man page and even the options within the top console itself (O), just pressing…
user27807
94
votes
1 answer

How to change primary group?

I have a user like this: uid=501(ironsand) gid=500(foo) groups=500(foo),10(wheel),497(git),501(ironsand) And to change primary group to ironsand like gid=501(ironsand), I typed this command: sudo usermod -g ironsand ironsand It changed groups…
ironsand
  • 5,085
  • 12
  • 50
  • 73
94
votes
5 answers

How do you hide a tmux pane?

I have 3 panes in my tmux window: -------------------------- | | 2 | | | | | 1 |----------| | | 3 | | | | -------------------------- Panes 1 and 2 have vim.…
user881300
  • 1,489
  • 2
  • 13
  • 14
94
votes
6 answers

How to enable and use code folding in Vim?

How can I enable and do code folding in Vim? Do I have to change anything in ~/.vimrc? I type z+a and z+c and z+o and nothing happens. Here is an article about folding: Code folding in Vim.
Mohammad Reza Rezwani
  • 1,195
  • 2
  • 9
  • 9
94
votes
15 answers

How do I get current keyboard layout?

I'm wondering if there is any command line tool that returns the current keyboard layout. I have XkbLayout set to us, ru. Update: setxkbmap returns layout settings, not selected layout. E.g.: $ setxkbmap -print | grep xkb_symbols xkb_symbols {…
Andrew
  • 1,392
  • 2
  • 10
  • 14
94
votes
13 answers

Linux tools to treat files as sets and perform set operations on them

Does anyone know of any linux tool specifically designed to treat files as sets and perform set operations on them? Like difference, intersection, etc?
nilton
  • 1,043
  • 1
  • 8
  • 5
94
votes
3 answers

How does Linux "kill" a process?

It often baffles me that, although I have been working professionally with computers for several decades and Linux for a decade, I actually treat most of the OS' functionality as a black box, not unlike magic. Today I thought about the kill command,…
seratoninant
  • 813
  • 1
  • 7
  • 6
94
votes
3 answers

Open a window on a remote X display (why "Cannot open display")?

Once upon a time, DISPLAY=:0.0 totem /path/to/movie.avi after ssh 'ing into my desktop from my laptop would cause totem to play movie.avi on my desktop. Now it gives the error: No protocol specified Cannot open display: I reinstalled Debian…
justin cress
  • 1,311
  • 2
  • 10
  • 14
93
votes
2 answers

Reading grep patterns from a file

I have a couple of big text files and in the file UNIQS.txt I have a list of strings to grep from another file. The code I use is grep -f UNIQS.txt EEP_VSL.uniqs.sam > UNIQ_templates.sam which does nothing - the file generated is empty. But when I…
Stiofán Fordham
  • 1,115
  • 2
  • 8
  • 8
93
votes
63 answers

What are your favorite command line features or tricks?

Share your command line features and tricks for Unix/Linux. Try to keep it shell/distro agnostic if possible. Interested in seeing aliases, one-liners, keyboard shortcuts, small shell scripts, etc.
cmcginty
  • 2,633
  • 4
  • 21
  • 12
93
votes
2 answers

How to insert text into a root-owned file using sudo?

Possible Duplicate: Redirecting stdout to a file you don't have write permission on Running a command like sudo echo 'text' >> /file.txt fails with: bash: /file.txt: Permission denied
tshepang
  • 64,472
  • 86
  • 223
  • 290
93
votes
8 answers

Linux: How to find the device driver used for a device?

If my target has one device connected and many drivers for that device loaded, how can I understand what device is using which driver?
Deepu
93
votes
4 answers

Why does Linux use LF as the newline character?

As far as I know, every operating system has a different way to mark the end of line (EOL) character. Commercial operating systems use carriage return for EOL (carriage return and line feed on Windows, carriage return only on Mac). Linux, on the…
Bagas Sanjaya
  • 1,092
  • 1
  • 7
  • 9
93
votes
3 answers

What is the best text-mode web browser?

I'm looking for one that is frequently updated and full-featured.
Zignd
  • 3,003
  • 10
  • 35
  • 48