78

Holding down the Ctrl-Alt while dragging the left mouse button.


61

look for the script's pid using ps ps -ef|grep script.sh Fdo 8983 8463 0 12:28 pts/2 00:00:00 /bin/bash ./script.sh check /proc/$PID/fd/; there should be a broken link to the script file, but cat should work (while the script is running!): cat /proc/8983/fd/255 #!/bin/bash # script contents! good luck!


59

My problem is not the same as can't type lower cased e in amazon ec2 (Amazon Linux), but similar. After checking /etc/inputrc and finding nothing out of the ordinary, I remembered that I did do some keybinding in the /etc/bash.bashrc. This was already there for a very long time and worked flawlessly, though. Why would it make problems now? I found out ...


54

iftop is cool and lightweight. ntop is even cooler but web-based and uses a daemon.


48

Actually, a typical invocation of sudo does not read the password from stdin at all. Instead, sudo will directly access the controlling terminal (a tty or pty, via the /dev/tty special file) and output the prompt and read characters directly. This can be seen in the tgetpass.c file in the sudo source. There are a few other scenarios: If an askpass program ...


38

I believe this is not so much about man itself but rather about your pager of choice (PAGER environment variable) combined with the terminal in use. I'm guessing your pager is probably less (typical default pager nowadays and fits with the description). less has an option -X that may get you a behavior along the lines of what you're looking for. -X or -...


34

A .inputrc in your home directory will cause ctrl+left to stop working on Ubuntu (for example). To get everything working, add the following to ~/.inputrc: # Include system-wide inputrc, which is ignored by default when # a user has their own .inputrc file. $include /etc/inputrc


34

su - username is interpreted by your su to mean "run username's shell as an interactive login shell" su username - is interpreted by your su to mean "run the following non-interactive command (-) as username" the latter only worked at all because: your su passes trailing arguments to sh for parsing sh takes - to mean "run as a login shell (read /etc/profile,...


25

Old question, but it might still interest people. Short anwser : qemu -nographic -serial mon:stdio -append 'console=ttyS0' binary.img ttyS0 valid on most PC. it would be something different on ARM system. Then the serial port and the QEMU are multiplexed on your output. You can switch between them with ctrl-A + C + ENTER. Long answer: check this blog, ...


23

hostnamectl is your friend (requires systemd). A few examples: Laptop without any virtualization $ hostnamectl status Static hostname: earth.gangs.net Icon name: computer-laptop Chassis: laptop Machine ID: 18a0752e1ccbeef09da51ad17fab1f1b Boot ID: beefdc99969e4a4a8525ff842b383c62 Operating System: Ubuntu 16.04.2 ...


21

IPTraf is another common real-time bandwidth monitor on Linux IPTraf-ng is a updated fork of IPTraf with ipv6 support


21

Yes. Your mysql dump is not clear text, but contains terminal controlling characters as well. Practically, it contains binary data. You can experience the similar flash if you print any binary data into your screen, f.e. cat /bin/bash. It shouldn't happen so. Some solutions: Check, where is the binary data in your mysql dump (I think, you had probably ...


14

You can modify .screenrc to allow mouse-based scrollback: http://slaptijack.com/system-administration/mac-os-x-terminal-and-gnu-screen-scrollback/


14

As @Sven mentioned, the best option is to use screen or tmux. These are tools known as "terminal multiplexers". They allow you to create shell sessions which can be attached and unattached from actual logins. These tools aren't only useful to check your work from another terminal, but have other features, including sharing your session with another user and ...


13

I have added the following alias to my .bashrc file. It uses O G's answer but wraps it in an alias. Works like a charm ;) # Force xterm-color on ssh sessions alias ssh='TERM=xterm-color ssh'


12

This looks absolutely puzzling to me. Either it should use some DNS name or IP address. I checked the last.c file also but I still can't find why it is not showing anything. Probably given some time, I can figure out the part about 0.0.0.0. int dns_lookup(char *result, int size, int useip, int32_t *a) 307 { 308 struct sockaddr_in sin; 309 struct ...


12

Hint 1: gpg calls private keys 'secret' because PGP dates from before people settled on the names 'private' key for the half of an asymmetric pair held by (ideally) only one party versus 'secret' key for a symmetric value usually held by two or more mutually trusting parties but nobody else. man gpg2 | less "+/export-secret" then n (go to second match) ...


11

Add this to ~/.screenrc log out of screen and back in: shell "/usr/bin/bash" termcapinfo xterm* ti@:te@


11

On Linux you can use the -@ option: -@ file lists. If a file list is specified as -@ [Not on MacOS], zip takes the list of input files from standard input instead of from the command line. For example, zip -@ foo will store the files listed one per line on stdin in foo.zip. So in your case you should be able to do: cat diff-files....


11

If you are running less as your pager (which is very common), you don't need to deal with modifying your pager, just do I/O redirection: man <whatever you want to man> | cat - This will print a copy to the terminal so you can scroll up when you need it.


10

I spent a while trying to find documentation on this, and got this from a Fortinet Engineer. Install like any other using tar.gz file Then run below command in linux CLI Then run below command in linux CLI ./forticlientsslvpn_cli --server 172.17.97.85:10443 --vpnuser forti Make sure the command run from the sslvpn directory. Substitute the IP address ...


10

nethogs, in case you need traffic analys per application - darkstat also works (web frontend)


10

Many network devices use the Yost RJ45 pinout for RS-232 console communications. Cisco is probably the best known, but certainly not the only. The switch should have come with a DB9 to RJ45 blue cable. You can just pickup any USB-DB9 Serial adapter (though I highly recommend getting one with a Prolific PL2303HX Rev D Chipset, as they "just work" and are ...


10

The pipe connects sudo cat's stdout to less's stdin, so sudo cat's stdin is unaffected, and able to receive the password. As for the prompt, it goes out on sudo cat's stderr; in bash, try redirecting that along with stdout, using sudo cat /etc/resolv.conf |& less and see how different the response is.


9

Telnet provides the ability to communicate with a service, nothing more nothing less. If that service happens to be a shell on a server, great, but it's not always. I often use telnet to send a malformed HTTP request manually, or to manually run commands against an SMTP server. SSH is way more than just a way of logging on to a server remotely. It can be ...


9

Either use a terminal program that understands UTF-8, or tell your shell to not use UTF-8 via $LANG. >>> print u'°'.encode('utf-8').decode('latin-1') °


9

You have a NAT router or a similar stateful firewall between your client and the server. When you opened the TCP session, the firewall remembered that a TCP connection was created between your client port and the server port. As long as the firewall remembers the connection, it will continue passing packets between the client and the server. The session "...


9

One way to do it: TMUX As most answers already pointed out - if in an existing SSH session - you use tmux (or screen) with the command tmux You now are in a new bash session, in which you can start your program / command. You can close it anytime (but not with CTRL+D, rather by closing the window) and return to it later by building up an SSH connection to ...


8

Glances - Eye on your system is what you are looking for. I previously used it on Linux, it is cross-platform and is really good. Here is my screenshot.


8

Those give all detailed info in a ui-style. If you are looking for a much simplier one use: vnstat -l You'll get something like (realtime updates): [user@host ~]$ vnstat -l Monitoring em1... (press CTRL-C to stop) rx: 4 kbit/s 5 p/s tx: 4 kbit/s 3 p/s The same command can be used to get daily/monthly/etc traffic ...


Only top voted, non community-wiki answers of a minimum length are eligible