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
0answers
19 views

how to get a “parent-child” relationship with tmux panes and windows

Essentially I'm trying to mimic fork when I split a window or create a new one from an existing tmux session. For example lets say you enter a shell in gnome-terminal and then launch a new gnome-...
0
votes
1answer
27 views

PROMPT_DIRTRIM not working

I have the following in my .bash_profile: PROMPT_DIRTRIM=3 export PS1='$ \u in \w: ' However, when I navigate deep within a directory, the path doesn't shorten. This is what the prompt shows: $ ...
3
votes
4answers
53 views

How to change the background color for exactly one line?

Here are my tries: The last one worked, but it breaks copy-pasting (adding a lot of spaces when copied). Is there a better way? Copyable text: $ PS1='\['$'\x1b[0m\]$ ' $ echo -e "\x1b[41;...
4
votes
1answer
231 views

How to know the utilization of intel CPU and GPU in Linux?

In ubuntu, to know the time taken by CPU to run a program we would use time in terminal. Whereas in case of intel GPU, we would use intel_gpu_time. But in case of CentOS time command works. But ...
1
vote
1answer
37 views

Turn htop into widget

I am a big fan of htop and would like to know if it is possible to turn it into a widget? I currently use Fedora 23 with Gnome 3.18.5. Currently I just open a terminal, resize it so show only the ...
0
votes
0answers
27 views

Trying to find something that can automatically delete certain lines of a text file after a certain amount of days

For example if I have test.txt and when I open it up it has 1 2 on the first line and 3 4 on the second. But after 2 days I want the second line gone but basically automated.
1
vote
2answers
66 views

Keyboard shortcuts C-h, C-m in bash [duplicate]

Bash uses GNU Readline. Readline provides a collection of keyboard shortcuts. However, there are some shortcuts that work on bash and that are not documented in Readline reference. Some examples are: ...
-2
votes
1answer
27 views

How do I ssh my Mac from another server? [duplicate]

I want to ssh my iMac at home from my MacBook when I'm away, but I can't figure out how to ssh when I'm not on the same local network. I have configured my iMac to accept ssh through the "Remote login"...
1
vote
0answers
20 views

Changing CentOS 7 machines disables terminal access during background task

Based on this other posting, I typed the following command into a CentOS 7 terminal on a devbox that has the gnome GUI, and was able to continue to use the terminal for other commands while the ...
0
votes
0answers
56 views

I cannot type the letter 'l' in terminal on mac

I can type the letter L on any other applications except for within the terminal. I was wondering whether it would have something to do with the bash setting in .bashrc. I am running Ubuntu.
7
votes
2answers
64 views

Display stdout and stderr in two separate streams

I'm looking for a way to visually separate stdout and stderr, so that they don't interleave and so that they can be easily identified. Ideally, stdout and stderr would have separate areas on the ...
0
votes
0answers
41 views

Data gets lost while trying to copy text into a shell [duplicate]

System is Scientific Linux 7.2 with Mate Desktop. I am trying to copy an iptables-script from website https://www.pozzo-balbi.com/help/Iptables-script to a shell, which will create a file. It is the ...
1
vote
2answers
44 views

Regarding equating file attributes in “ls” command

I have a folder in which there are thousands of images. Of those thousand images, I want to bring together all those images whose “Last created” and “Last modified” attributes are exactly same. ( In ...
-4
votes
2answers
76 views

How do I remotely connect to my iMac from another server? [closed]

I want to ssh my iMac at home from my MacBook when I'm away, but I can't figure out how to ssh when I'm not on the same local network. I have configured my iMac to accept ssh through the "Remote login"...
0
votes
1answer
46 views

CentOS 7 Why does the beep package not exist?

I am not able to find the fabled 'beep' package using a yum search. How am I to make a beep on my system from the terminal without the package? echo '\a' does not work either.
3
votes
4answers
354 views

How to slow down the scrolling of multipage standard output on terminal?

On a cluster where I am part of the management team, I often have to go through the multipage standard output of various commands such as sudo find / to look for any troubles such as broken links or ...
1
vote
1answer
48 views

Shell - PTS/0 Suddenly Changed to PTS/1 Why did it happen and how to change it back?

Whenever I enter the who command in the SSH I see the PTS/1 after my username. Two days ago it was still PTS/0. Is this called the TTY? How do I make it PTS/0 again? Also the path now is /dev/pts/1 ...
1
vote
2answers
64 views

Wait until a process comes back from sleep

script.sh is run by run.sh N times in parallel. For N=1, the script.sh process is set to sleep 30-45 seconds before it actually starts. How can I order ALL script.sh instances for N>1 not to start ...
0
votes
1answer
27 views

What type of terminal to support if implementing a terminal emulator? [closed]

I have heard that VT100 is the de facto standard. Does it mean if I can just support VT100 and then my terminal can work for existing commandline applications without big problems? If not, how to make ...
0
votes
0answers
44 views

tailing file in new terminal window

I have the following two bash scripts (perhaps they can be condensed into one). // pre-tail.sh #!/usr/bin/env bash open -b com.apple.terminal `dirname $0`/tail.sh // tail.sh #!/usr/bin/env bash ...
0
votes
0answers
92 views

Run console printing command after tmux starts up

I'm starting tmux from zsh with the window split into two panels. The only issue I'm having is screenfetch starts up and prints to both windows. Ideally I only want it printing on the left window. I ...
0
votes
0answers
19 views

Powerlines fonts get weird after rebooting

My configuration : Fedora 23 KDE Plasma x64 My terminal emulator : Yakuake with Tmux Context : I recently changed my Oh My ZSH! theme for agnosterzak. This theme needs a Powerline font. I tried a ...
2
votes
2answers
35 views

Change Name of Mounted Hard Drive

I just mounted and formatted an extra hard drive to Xubuntu, and the name is way too long for access from the terminal: boy@boy:~$ cd /mnt/d1b2aa11-a3e4-434b-b71c-47a8ac23ac23/ boy@boy:/mnt/d1b2aa11-...
2
votes
1answer
85 views

Ctrl + arrow keys working in tmux

When I SSH in to our server, control + arrow sequences are working fine for me: Ctrl + V then Ctrl + up, down, right, left gives ^[OA, ^[OB, ^[OC, and ^[OD respectively. In tmux, I get ^[[A, ^[[B, ^[[...
1
vote
0answers
28 views

Find recursively files that have a percentage of lines in common

Is possible to do this? I want an output where i have only files that are 50% the same of others or have 20+ lines in commons. I'm trying to isolate commons functions in *.java files. Thank you!
2
votes
0answers
49 views

Network traffic monitor “nettop” morphing away from expected results

On Mac, I open a new shell and enter nettop. For a split second I see chrome (as I expected) and some other things going on (had to record screen to catch them); then I'm only shown data on ...
4
votes
2answers
40 views

How would I get my terminal to regurgitate the previous output text from past commands? Is this even possible?

I just ran a job that takes several hours, and I forgot to pipe that text into a text file. pseudocode: echo [previous text output] > OutputHistory.txt Additionally, I can't just "copy and ...
1
vote
0answers
44 views

How do I tell fanout to forcibly allocate a pseudo-terminal? [closed]

I am using William Stearns' fanout (discussed in a Dr Dobbs article by J.D. Baldwin on 2004-04-07). Whilst running it am seeing the message Pseudo-terminal will not be allocated because stdin is not ...
3
votes
3answers
62 views

Convert output of script(1) to pdf

You supposedly can make some sort of low-tech replacement to screencasts of your terminal sessions with script(1): DESCRIPTION script makes a typescript of everything displayed on your terminal. It ...
1
vote
1answer
39 views

How to generate a set of new different files through shell scripting given a certain pattern name?

How to generate a set of new different files through shell scripting given a certain pattern name? Said I have this pseudocode: #!/bin/bash for i in {1..5} do ./processing < base.ppm > ...
0
votes
2answers
123 views

How do I print 'block' letters in the terminal?

How do I echo/print block lettering in the terminal like: ? figlet and toilet don't help. Neither do U+25A0 or U+2588 unicode characters. This is not a duplicate. As I said, figlet, banner and ...
1
vote
3answers
61 views

Different outputs to different terminals in Ubuntu

I am developing a C++ application, under Ubuntu, and need to broadcast the outputs into several terminals. I need to do this programmatically, calling (for instance) bash commands from the C++ ...
0
votes
0answers
24 views

How do I free up the terminal when I am using emacs? [duplicate]

I know I can open another terminal, but that is bothersome.
1
vote
1answer
25 views

How to connect via LAN Wire and a WIFI Router to the internet (terminal only)

I have a big problem. My cinnamon GUI went down. Now I have to reinstall it. Therefore I need an internet connection. Since I can only work within terminal I have to use that to connect to my Wifi. ...
1
vote
3answers
40 views

Extending Linux terminal Program [closed]

Any quick ideas on how to write a program that extends the terminal's basic functionality? I want to do everything the terminal does but additionally do some custom processing on whatever the user ...
3
votes
1answer
55 views

Scroll to the last command on Terminal? (like OS X Terminal marks)

Mac OS X Terminal marks are incredibly useful. For example, when I type a command that echoes a lot output, it's easy to read the beginning with Cmd+Up. It will scroll to the last command and ...
0
votes
1answer
28 views

dhclient connecting to wlan0 after wpa-supplicant setup polls infinitely

I just wanted to try out how to connect to my WIFI WPA2 via terminal. Therefore I created "/etc/wpa_supplicant" network = { ssid = "nameOfWifi" psk = "passwordNumberThatIFoundOnTheWifiHardware" ...
0
votes
0answers
26 views

How is a key sequence processed in a terminal? [duplicate]

My question comes from re-reading Gilles' excellent reply, and my recent comment on it. In a terminal (physical one, or virtual one such as Gnome terminal), when a key sequence is typed, is the ...
33
votes
3answers
3k views

How do I create a terminal-based GUI?

I'm looking to create a terminal-based environment to adapt my Bash script into. I want it to look like this:
1
vote
2answers
48 views

A quicker way to change owner/group recursively? [duplicate]

Currently, when I want to change owner/group recursively, I do this: find . -type f -exec chown <owner>.<group> {} \; find . -type d -exec chown <owner>.<group> {} \; But ...
0
votes
2answers
57 views

Tmux shortcut problem

While using Tmux, I tried to maximise the current pane using <prefix> z, and had a bit of a keyboard fail and accidently held down the prefix keys while pressing z, instead of letting go of the ...
5
votes
1answer
110 views

Can a script determine which characters a terminal can display?

I'm working on a script that displays UTF-8 characters as output. In my Gnome Terminal, this prints out a pretty maple leaf (🍁): $ echo -e '\xF0\x9F\x8D\x81' In rxvt, it prints out a box (the ...
0
votes
1answer
34 views

Return owner of process given PID

I'm trying to grab the owner of a process from a list, I have the command pidof nmap to get the then ps -u <PID> | grep USER that I'm currently playing around with, but when I run it, it ends ...
0
votes
2answers
41 views

Insert/overwrite mode in fish

I'm using Linux Mint on a MacBook and on its keyboard the equivalent for the INSERT key is the combination Fn + RETURN. At the moment I can only see the intended behavior of this combination in GNU-...
1
vote
2answers
40 views

automatically disown application when running it from a terminal

How do you automatically disown an application after you have started it from a terminal? For example: if you start a terminal and run firefox the application will start, but when you then close the ...
0
votes
1answer
30 views

how to echo/print block by block

I just started using tmux and butterfly and I need to scroll one panel. I tried Ctrl + b + ↑ but it scrolled the whole terminal instead of one panel. Is there any command line to display my ...
1
vote
1answer
44 views

xkill Used On Desktop

Mouse accidentally clicked on Desktop while active with an xkill terminal command. Which makes it completely without use. Have used nemo command which resets everything as long as terminal remains ...
1
vote
1answer
22 views

Understanding what is happening when I dump a terminal character sequence with Ctrl-v?

If I want to bind a key-mapping to a function or widget in zsh I have learnt that I first have to hit Ctrl+v - at a prompt, then enter the key sequence I want to use, then use the output in my key-...
1
vote
7answers
79 views

Rename files add dashes after fourth and sixth characters

I have some files such as: 20150716_something-here 20150716_something-heretoo 20150716_something-hereaswell They need to be renamed as 2015-07-16_something-here 2015-07-16_something-heretoo 2015-...
14
votes
2answers
841 views

Colored output?

When I execute a command from a terminal that prints coloured output (such as ls or gcc), the coloured output is printed. From my understanding, the process is actually outputting ANSI escape codes, ...