A terminal is an environment for text input/output. Inside the terminal, one runs command-line and text mode programs (including shells).

learn more… | top users | synonyms

0
votes
2answers
34 views

What are the meanings of different Unix commands? [on hold]

I am running Ubuntu 14.04 on my machine. I am new to Linux and feeling lost when I see different command line commands (or what exactly are they called?) like sudo, apt-get, mkdir, -R, -n etc. while ...
1
vote
1answer
16 views

Shutting down X via terminal

I found that the whole X won't react to anything but I was able to log to terminal by ctrl+alt+F1. Can I reboot X from the command line without rebooting the whole computer?
2
votes
1answer
23 views

Can I add mouse support in less?

I've just discovered that I can add the following lines to ~/.vimrc. set mouse=a :vmap <C-C> "+y This has the effect of being able to select text with the mouse (i.e. in visual mode), and ...
3
votes
1answer
22 views

How do I stop screen from clobbering my titles?

I am using bash and GNU screen on centos7. I notice that if I ssh to another server, change the title (via ctrl+a+A), and log out of the server that my new title gets overwritten by USER@HOST:~. How ...
1
vote
0answers
15 views

Echoing Backspace Characters in the Terminal

I'm working with picocom running inside gnome-terminal. I have local echo switched on inside picocom using the -e option, and when I backspace I can see that caret moves backwards, however the ...
1
vote
1answer
10 views

Locating the terminal currently in use

I need to write a script to test if im using the correct terminal and then print a message This is what i have so far if(???? == dev/pts/1) echo Access Granted. Welcome. endif I dont know how to ...
-1
votes
0answers
35 views

Practical usage of pushd, popd, man, less, and cat in bash [closed]

So i am learning more advanced usages of bash/cmdline due to work teaching me some programming and im trying to wrap my head around some of the following bash cmd's and their purposes. I have been ...
7
votes
3answers
274 views

How can a Bash script tell how it was run?

I have a Bash script I was trying to make to help me run a rather complex command with small changes that it would ask me about through echo and read. I have found solutions to force it to run a ...
0
votes
1answer
7 views

:bnext not cycling through all buffers in vim

For some reason :bnext is not cycling though all the buffers shown by :buffers I have 5 buffers open but only 3 buffers are visited when I used :bnext repeatedly. How can I cycle through all the ...
0
votes
0answers
25 views

Weird behaviour of mouse in terminal and text-mode programs [closed]

I'm using terminal and SSH to work on a Linux machine - from Mac but the target machine seems to be the problem. Indeed, I found a really weird mouse behaviour; according to the program I'm using, ...
0
votes
1answer
32 views

How to update CodeBlocks in Kali Linux?

I installed CodeBlocks on Kali Linux but I got 10.05 version and I want to update it to 13.12, preferably via terminal. Also I would like to know how to update any application this way.
2
votes
1answer
17 views

Replay a screen log file incrementally

I have run some commands in gnu screen and used the C-a H command to record the output to a screenlog.0 file. However now I want to view it. There are loads of terminal escape sequences, so just ...
4
votes
2answers
122 views

Why can't Emacs running in a terminal distinguish Ctrl+; from “;”?

This question arose from my previous question on emacs beta. In short I want to bind C-; to an Emacs functions in a terminal, but it seems that something captures this key before it reaches Emacs: ...
3
votes
1answer
18 views

Check for missing files in two directories and their respective subdirectories

Folder alpha has one subfolder, and files in both root and in subfolder. Folder beta has 25 subfolders with files in them. How would I compare the file contents of alpha and beta, checking for ...
0
votes
1answer
41 views

What is the string “xxx@xxx:~$” in terminal called? [closed]

I don't know or I just forget what is xxx@xxx:~$ called in a terminal terminal? Is there name for it?
3
votes
1answer
181 views

Waching YouTube videos in bash sessions, in ASCII mode

I already found how to watch YouTube videos in terminal, in ASCII mode, but my goal is to watch them in a bash session, without opening a different window. So, supposing I already have a tmux ...
3
votes
0answers
23 views

How to change background color of a pane in tmux?

I would like to change the background color of the inactive panes in tmux to better distinguish between the active pane and inactive panes. Something just a few shades different than the default. How ...
62
votes
3answers
5k views

Watch YouTube videos in terminal

Like the title says it, I'm looking for a way to watch YouTube videos in terminal (not in a browser or another window, but right there, in any bash session). Is there a simple way to do this? I ...
0
votes
1answer
42 views

ANSI escapes in Pash prompt are displayed as garbage in Gnome terminal

I would like to use Pash, a PowerShell implementation for mono on my CentOS box. After compilation I started it and got $ mono Source/PashConsole/bin/Debug/Pash.exe ...
0
votes
1answer
25 views

xfce4 terminal: disable individual shortcut

I would like to disable the Ctrl+Shift+W shortcut which closes the current terminal tab. I am using Vim where Ctrl+R Ctrl+W moves between windows of the vim instance. Sometimes it may happen that the ...
0
votes
0answers
49 views

Can call login command from terminal

I want to create a user using useradd from root in my terminal window, after it I call passwd to set user's password. So I cant call login username because when I call it from terminal it closes ...
5
votes
1answer
205 views

combining find with other commands: when to use -exec and when to use pipe? [duplicate]

I've learned to use the find command by itself to find files and directories however when it comes to doing something with the files/folders I'm confused. Given the following command: find . -type f ...
1
vote
0answers
37 views

How can you (programatically) detect the ANSI escape code supported by terminal?

I am playing around with shell scripts that use ANSI codes and found that for one reason or another different escape codes are supported depending on your terminal/os.. In some cases I get a dump of ...
2
votes
1answer
68 views

How to remove specific lines from a file?

I have a file (ip.txt) that contains ip rules /sbin/iptables -A INPUT -p tcp -s 140.237.4.252 -j DROP /sbin/iptables -A INPUT -p tcp -s 143.227.5.22 -j DROP /sbin/iptables -A INPUT -p udp -s ...
3
votes
2answers
35 views

Modular $TERM for different terminal emulators

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 ...
2
votes
1answer
74 views

To write this Pseudocode with Regex

I am doing a Makefile which I run regularly by Crontab every day at 0230 crontab -e; 30 2 * * * /bin/thePseudocode Python-like Pseudocode directories = ["Cardiology", "Rheumatology", "Surgery"] ...
4
votes
2answers
28 views

Long start time of MC due to bash function

I have next bash function to ensure new-lines after commands: user at terra in ~ $ echo "m" m user at terra in ~ $ echo -n "m" m↵ And the function itself in a .bashrc: function prompt_command { ...
2
votes
1answer
62 views

Why doesn't Ctrl+R do anything in Ubuntu's terminal? [closed]

The keystroke Ctrl+R is important to me because it's the redo command in vim. However, it seems to do nothing at all in Ubuntu's terminal. When I press Ctrl+V and then Ctrl+R, nothing is registered at ...
3
votes
1answer
81 views

Bind Ctrl+Down in Joe on a Linux console

When I want to select a line in joe editor, I can go to the beginning and simply pres CTRL-Down and this will select the line. I can move somewhere ales and copy the line with CTRL-k-c. The key code ...
3
votes
1answer
86 views

cannot create special file /dev/pts/0

When using midnight commander in console, I cannot "toggle" the window (using CTRL-o Not an xterm or Linux console; the panels cannot be toggled however, my $TERM is set to linux. After some ...
1
vote
1answer
42 views

exec -t is invalid

I made an rpm that installs a .run file and whenever I run the rpm and the rpm tries to execute the .run file I keep getting the error that exec -t is an invalid option at the following lines of code ...
0
votes
1answer
53 views

open gnome terminal with serveral tabs and execute a few commands in every tab

This is what I want to accomplish: I want to open a gnome terminal with five tabs in it I want to run a set of commands (5 – 10 commands) in each tab automatically First tab: shall set clear-case ...
16
votes
2answers
886 views

Are the terminal color escape sequences defined anywhere for bash?

I've used every so often colors in Bash scripting (mostly on CentOS), but to make their usage more convinient I end up redefining variables to color values: local GRAY="\[\033[1;30m\]" local ...
1
vote
0answers
41 views

How does a terminal emulator work [duplicate]

I never really understood how a terminal emulator (be it e.g. XTerm or the Linux virtual console) works. What transformations happen to the input (key up/down events) to produce the output (usually ...
1
vote
1answer
30 views

Tmux: how do I bind to C— (control-minus)?

I'd like to bind to control-minus in my .tmux.conf but it doesn't seem to work: bind C-- split-window -v Is this possible?
1
vote
1answer
15 views

ag output appears different in the terminal vs when piped to a file

When I run the ag command to search text files, I get output that looks like this on the command line (full results not shown): ❯ ag dependency 140317155505.md 27:The Bundler dependencies API ... ...
0
votes
0answers
14 views

Terminal output from a program not opened in terminal [duplicate]

Using bash on Ubuntu, I can launch programs from command line and watch what the program is doing 'in the background' while I use the GUI frontend. This is particularly handy when a GUI progress bar ...
2
votes
2answers
39 views

Non-printing escape sequence: when?

Recently, I have been playing around a lot with color in the terminal and, therefore, with escape sequences, too. I've read the relevant parts of the Bash manpage along with numerous helpful pages on ...
0
votes
0answers
32 views

How to suppress label hover-over path display in MobaXterm (or Xterm generally?) of file being edited

I am using a great free package called MobaXterm [ http://mobaxterm.mobatek.net ] on Windows to access linux systems via SSH. With this I often find it useful to flip between two tabs to visually ...
0
votes
0answers
13 views

Set numer of rows for gnome-terminal or other emulators

I'm aware there exists stty, which allows to set number of rows in a virtual console, such as tty1. However, this does not seem to work with gnome-terminal or xterm. The question therefore is, how ...
4
votes
1answer
42 views

Printing to an X terminal faster than printing to tty?

In Linux Mint 17, I was testing the printing speed of the default ttys versus the speed of a mate-terminal running on Xorg. To test the speeds, I generated a random file: dd if=/dev/urandom ...
0
votes
1answer
50 views

How do I switch from bash to zsh? [duplicate]

I can start zsh with zsh. How can I make it be the default for new terminal windows? Will it be ok to copy my .bashrc to .zshrc to get things like my customized PS1 prompt.
0
votes
0answers
17 views

Is there a version of script that plays nicely with vim?

man script says: Certain interactive commands, such as vi(1), create garbage in the type‐ script file. Script works best with commands that do not manipulate the screen, the results ...
0
votes
1answer
53 views

Neither `less` or `less -X` clear screen on exit

Neither less or less -X clear screen on exit. At the same time, vim does.... Env iTerm2, protocol mosh, server Centos + tmux + zsh iTerm2: report term as xterm-256color tmux: set -g ...
1
vote
2answers
55 views

Why does FreeBSD require terminal programs to be started as root?

On FreeBSD all graphical terminal programs (e.g. xterm, rxvt) seem to be installed setuid root, or with setuid root wrappers. On Linux, this is not the case on any distribution I have ever used. Why ...
1
vote
1answer
21 views

Some letters on gnome-terminal can't be typed by specific user

I have a very strange problem on my Ubuntu 14.04 machine. I can't use some letters like r and i in gnome-terminal. Note: when my CapsLock is on I can type R and I in terminal. The problem on my ...
1
vote
1answer
45 views

Send specific signal number with specific key

I want to set a specific key like F12 to send me a specific signal number that out of linux signals range that I can handle this signal with trap command. How can I do that? NOTE: I'm working with ...
2
votes
1answer
235 views

make: *** [all] Error 2

I tried to install a decompiler on my macbook, but the terminal returned errors below. ouekihodos-MacBook-Pro:radare2 LewisWang$ gmake /Applications/Xcode.app/Contents/Developer/usr/bin/make -C ...
0
votes
1answer
30 views

Can I get my iTerm key-combos working in tmux?

I have some shortcut keys defined in iTerm, and I use them for key-mappings in Vim. For example, I map Ctrl-Enter to send a ^[O2P escape code, which I then use to define a Ctrl-Enter key-mapping in ...
3
votes
2answers
80 views

Shell loses keypresses when running SSH in the background

I'm experiencing a bizarre problem with SSH + Bash + Terminal.app: when SSH is run in the background, the shell appears to randomly lose keypresses ~50% of the time. For example, if I run: $ ssh -N ...