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
1answer
18 views

How can I take the test user into sudo file?

I would like to see the ifconfig file with test user (under Linux Debian) that's why I have used the sudo task, but the terminal said that: test is not in the sudoers file. How can I take the test ...
1
vote
2answers
735 views

The command ` ls -ltu ` fails to list folders/files based on last accessed time

First on your linux desktop create 2 folders. a b Now run this in the terminal ls -ltu the result is drwxr-xr-x 2 root root 4096 Aug 30 20:33 b drwxr-xr-x 2 root root 4096 Aug 30 20:33 a ...
1
vote
1answer
9 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 ...
7
votes
3answers
239 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 ...
-1
votes
0answers
32 views

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

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 ...
1
vote
2answers
458 views

Command not found problem in Linux-Ubuntu terminal

My friend is having problem in trying to call make to compile an application which both me and a second friend have previously successfully compiled. The file uses a "linux-devkit" pack that possess ...
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 ...
10
votes
3answers
23k views

How to append multiple lines to a file with bash

I am writing a bash script to look for a file if it doesn't exist then create it and append this to it: Host localhost ForwardAgent yes So "line then new line 'tab' then text" I think its a ...
0
votes
0answers
24 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
19 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.
0
votes
1answer
1k views

unable to open X server

I am trying to generate a screenshot of a firefox window in my terminal, but I keep getting an error: root@host [~]# DISPLAY=:1 firefox http://www.cnn.com & sleep 5 && DISPLAY=:1 import ...
4
votes
2answers
118 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: ...
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 ...
1
vote
1answer
568 views

Corrupted gnu-screen session not displaying UTF-8 correctly

(Edited to clarify the role of Emacs in the problem with the display.) My current gnu-screen session has gotten corrupted somehow, and Emacs fails to display UTF-8 characters properly. I've ...
1
vote
2answers
115 views

use mosh without giving up local scrollback / history?

Is there a way to use mosh without giving up the local scrollback? Basically, in some circumstances, IP-roaming is indeed useful and needed, but the extra terminal emulation and key prediction seems ...
61
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 ...
10
votes
4answers
25k views

How to write the output of live-f1 into a file

I opened terminal and ran live-f1 which displays live feed in terminal (text) that changes every second. Only "Enter" key can be used while this program is running (it exits that program). So you ...
0
votes
0answers
39 views

Curses becoming less popular, is there a reason? [closed]

I notice that curses-based applications seem to have become unpopular and nowadays developers mostly seem to be making Gnome or KDE interfaces. Is there a specific reason why curses is losing ...
3
votes
1answer
16 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 ...
1
vote
2answers
54 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 ...
0
votes
1answer
34 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?
4
votes
1answer
22k views

Linux shell - 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 ...
2
votes
1answer
800 views

How to get rid of special characters in the output of make [closed]

When I run gcc, it outputs errors but the function names are surrounded by special characters like this ‘setup_connection’: This same is repeated with variable names. I am wondering if the ...
6
votes
3answers
676 views

Pushdown Terminal Output

Is there a standard way to reverse the output order of a terminal output, ie: ~/Developer $ command0 -bash: comman0: command not found ~/Developer $ command2 -bash: command2: command not found ...
3
votes
1answer
175 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 ...
2
votes
1answer
672 views

Control and up/down keys in terminal for use by emacs

Is it possible to use C-up and C-down when running emacs in the terminal window (when starting emacs from the command line with the -nw flag)? What should my terminal send when I press C-up and C-down ...
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 ...
0
votes
1answer
41 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 ...
14
votes
2answers
18k views

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

Activating colors in links2 (text mode)

I can't seem to see colors in links2 (text mode), even after playing with my TERM settings. The links2 manpage and README.Debian don't specifically address this issue. Also, command-line options like ...
5
votes
1answer
202 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 ...
0
votes
1answer
22 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 ...
12
votes
3answers
7k views

Ctrl-s hang terminal emulator?

I came across a sentence in vimdoc: Note: CTRL-S does not work on all terminals and might block further input, use CTRL-Q to get going again. and this key indeed hangs my vim. I was ...
9
votes
3answers
6k views

What is stored in /dev/pts files and can we open them?

I am curious to know that what is stored in /dev/pts/ files. Can we open these files? According to my knowledge, /dev/pts files are created for ssh or telnet sessions.
1
vote
0answers
32 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 ...
7
votes
2answers
6k views

Poor TTY resolution with nVidia driver

The resolution of the TTY1-6 is poor ~ 640×480 Ubuntu 11.10 | Grub2 | nVidia | NVIDIA GT215 Board I went through the process on this site and after the edit the GRUB menu appears in the correct ...
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 ...
2
votes
1answer
71 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"] ...
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
67 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
1answer
82 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 ...
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
61 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 ...
2
votes
1answer
103 views

tmux: shared session, one user in a pane, another in another pane, two different cursors

I've decided to try tmux: have been reading the docs and googling around, trying to find a way to have two users sharing a session, each with a different cursor. However, giving 777 permissions to ...
7
votes
3answers
10k views

How to mount removable media in /media/<LABEL> automatically when inserted, without any desktop environment?

I have a Debian sid system (Wheezy) (and same for arch), without any desktop environment (and no Xorg at all). I can mount my SD-cards, USB sticks, external HDD by label into a specified directory in ...
1
vote
1answer
41 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 ...
22
votes
4answers
1k views

What are the responsibilities of each Pseudo-Terminal (PTY) component (software, master side, slave side)?

I am trying to figure out how a tty works1 (the work-flow and responsibilities of each elements). I have read several interesting articles about it, but there are still some blurry areas. This is ...
16
votes
2answers
879 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 ...
0
votes
1answer
48 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 ...