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
66 views

Issue with a script launching URL, then pkill firefox after X seconds with cron job

I am trying to create a shell script that will start firefox on a certain URL, then kill it 120s later. I have a script that mostly works and a bad crontab job that doesnt seem to. testscript.sh: ...
0
votes
0answers
15 views

How to run ping in background, disconnect from current terminal session and get back the ping process later on from new terminal session? [duplicate]

I want to monitor 2 of edge routers that currently have intermittent issue. I want to monitor their percentage availability using default ping parameter (1 ping per 1 second). If I run the ping ...
0
votes
0answers
257 views

Using chown $USER:$USER inside bash script

In a small bash script I'm running I am attempting to chown a new directory that is created. I've added: sudo chown $USER:$USER /var/www/$sitename sudo chmod 775 /var/www/$sitename after the line ...
0
votes
2answers
55 views

Keep execution of bash script when aborted via CTRL+X or CTRL+C

This is very nooby question I belive and I've tried everything to avoid asking it here, but I didn't found answere anywhere on whole internet. Go on and give me downvote but please answer me how to ...
1
vote
0answers
33 views

How to set environment variable for BACI compiler and interpreter?

I have installed executable files for BACI compiler and interpreter in my Ubuntu system. But now every time I have to compile my .cm file I have to go to the program folder and run ./bacc and ...
0
votes
1answer
45 views

How can I disable auto scrolling in gnome terminal?

When I enter a command with a long output such as locate linux, the output is too long to show on the current terminal screen, and so the terminal will scroll right to the end of the output. How can I ...
4
votes
5answers
280 views

sort order explanation

Giving a lot of files, sort -n gives me this result: f1.txt f10.txt f2.txt which doesn't seem right to me. What is the explanation? Can I get this by default: f1.txt f2.txt f10.txt
0
votes
1answer
41 views

Remote terminal application

Does anyone know if there exist an application which allows admin run other apps in kind of desktop environment. What i mean is a kind of VNC application which only gives user the terminal console, ...
0
votes
1answer
42 views

Change the way folders are displayed in terminal [duplicate]

I moved over from Xubuntu to Fedora. In a colored Xubuntu terminal the folders appear in bold blue wheras in Fedora they appear as normal blue. I'm familiar with ANSI codes for colors and style but ...
0
votes
1answer
32 views

Nano Editor over Screen in Terminal isn't fullscreen

When I connect to a device using Screen in terminal, if I open Nano text-editor it only takes up a fraction of the screen. How do I make it fullscreen?
0
votes
0answers
41 views

Broken prompt writes from the wrong position and overwrites text

From time to time, when I SSH from my Android device to my home Linux server my terminal randomly start overwriting text that was previously outputted. I am using JuiceSSH as my SSH client, and I've ...
0
votes
3answers
114 views

How do I print a certain line of python code using the Linux terminal?

If I am writing some python and I only want the terminal to show a certain line, what command do I use? For example my program is: print("line one") print("line two") print("line three") And I only ...
1
vote
1answer
64 views

Read a character from an x-y coordinate on the screen

Is there a way in bash to read a character from an x-y coordinate on the screen? This command would be something similar to cget 12 30 which would return the character at the 12th row and 30th ...
11
votes
3answers
1k views

Terminal vs bash? [duplicate]

I'm on a Mac but I think this is generally Unix-applicable. I'm in the process of learning shell scripting and there's something I seem to be missing. When I'm in the ordinary terminal, I can use ...
0
votes
0answers
62 views

Create an alias using Command, Option, Control, or Fn key as part of the input

How can we map these keys into part of an alias or custom shortcut within the terminal? Is it the key codes that must be used or is there another way?
0
votes
1answer
72 views

Terminal sandbox commands

I was wondering if there's a way to run shell commands that affect only a certain directory and its subdirectories. I'm using PHP and I want to make an app that allows the user to execute shell ...
0
votes
2answers
66 views

Turn off mail notification in terminal

I'm running some cron jobs on my machine and every time I fire up a terminal session I'm getting a 'You have mail' message (the job produces output on success which gets mailed to me). Any way to ...
0
votes
2answers
68 views

Tilde on unix:hpux and / or solaris

On Linux press F9 return a correct ~ On unix(solaris or hpux) return 0~ How to set correct tilde on those systems?
0
votes
1answer
137 views

How do I grep on a live log (stdout)?

I'm not sure if that what stdout is, but that's what I think. What I want to do is filter out a certain log message when running an executable. I tried this: Executable 2>&1 /dev/null | ...
1
vote
1answer
173 views

Is it possible to open a terminal with specified tty/pty

(I am using Ubuntu.) In my understanding tty is just a kind of port. You input something and it should output something. And a terminal (emulator) is a software handle those input and output. ...
0
votes
0answers
47 views

wrong MC colors when launched via xterm -e mc

I use ini-customized color theme in Midnight Commander 4.8. [Colors] base_color=linux:normal=cyan,rgb002:input=white,cyan:inputunchanged=black,cyan:dhotnormal=red When I launch xterm and then ...
0
votes
2answers
230 views

Running a program (command) on terminal after login screen in Ubuntu 14.04

NOTE :- This is not a duplicate question. I have searched about 100 times on this site and several others including Ubuntuforums,askubuntu and stackoverflow. I couldn't get my work done. OBJECTIVE :- ...
0
votes
1answer
225 views

Solarized theme in both mc and Terminator

I have configured Terminator to use Solarized color theme. I did the same for MC. However, the problem I have is that I don't get actual Solarized color scheme in MC (as there already is one below ...
1
vote
0answers
76 views

When I use zip, how can I display the overall progress without flooding the command line?

A fixed-length progress bar, a file or byte count, or better yet a timer showing the estimated time remaining would be ideal. zip's standard behavior seems to be to print a line for every file ...
2
votes
1answer
56 views

Monitor and alert user when stty settings change?

A particularly large (~10^6 LOC) program causes my stty settings to change from echo ixon icanon to -echo -ixon -icanon and I would like to find the function in this massive program that causes this ...
1
vote
2answers
75 views

Vim colors conflicting with terminal ones

For most vim colorschemes, they appear different than advertised when I open vim in xterm. I've been using xterm-256color and set t_Co=256. A similar thing happens when I use xfce-terminal, but the ...
0
votes
1answer
74 views

Running Linux in text mode - blank diamonds instead of Chinese/Punjabi etc. characters

While in the text mode and using, for example, Chinese/Simplified or India/Punjabi locale I get blank diamond symbols in the console in place of the characters. I am running Xubuntu with ...
3
votes
1answer
125 views

How do I come by this pty and what can I do with it?

It seems that a simple shell redirect from /dev/ptmx gets me a new pseudo-terminal. $ ls /dev/pts; ls /dev/pts </dev/ptmx 0 1 2 ptmx 0 1 2 3 ptmx It disappears as soon as the process that ...
1
vote
0answers
27 views

If I cancel when prompted for my Git password, I can no longer see anything I type, until I log back in [duplicate]

Everything still works (typing "exit", for instance, exits), but I can't see anything I type. There's not "funny characters", just nothing. Even re-running git and entering the password properly ...
0
votes
1answer
46 views

Problem connecting with Beagleboard through serial?

I'm trying to connect to a BeagleBoard on Ubuntu using a Serial-to-USB adapter. It is currently being recognized as ttyUSB0 on our system. When I run "screen /dev/ttyUSB0 115200" the output just says ...
1
vote
2answers
74 views

Locked out of my own mac terminal?

So recently, some of my friends had been tampering with my files and data through terminal, so I decided to secure it by doing two things: First, I added the following to my ~/.bash_profile for ALL ...
2
votes
1answer
71 views

Can I see remote terminal? [duplicate]

I am running a C program in a Cent OS machine. Now, the lab is locked in this weekend, but I have access to another lab of the institute. I can access the files etc. via SSH from a Mac machine in the ...
1
vote
0answers
45 views

how are runlevels from CentOS 6 chkconfig translated for CentOS 7 systemctl?

How would I translate the following command from CentOS 6 to run in CentOS 7? chkconfig --level 345 dovecot on My first guess is to type the following instead: systemctl enable dovecot But ...
1
vote
2answers
46 views

'Present' terminal window on shell/executable command?

Currently using Xfce and xfce4-terminal, but suggestions involving other Linux-based systems may still be helpful. I start a longish-running program in a terminal window, then alt-tab away and do ...
2
votes
1answer
190 views

Set default xdg-open application to terminal program

Is it possible to use terminal vim with xdg-open? I don't have a GUI text editor because I only use vim through the terminal. (I don't care very much for gvim either.) Is it possible to tell xdg-open ...
0
votes
0answers
46 views

Can I “hijack” a UNIX shell from another login? [duplicate]

Let's say I'm starting a job in a Unix terminal on a machine (a Mac if it matters), and this process does a lot of things and keeps printing output to the terminal. Then I go to another machine and ...
12
votes
2answers
938 views

Ctrl+D for ending terminal line input

If I do $cat > file.txt text<Ctrl+D><Ctrl+D> Question1: If I don't press enter, why do I have to press Ctrl+D twice? If I do $cat > file.txt pa bam pshhh<Ctrl+Z> [2]+ ...
1
vote
1answer
41 views

How does executing a file change the std input?

Imagine I have a script, which contains the goto command. The goto command will search in the std input for a line like this : jumpHere. But the std input is by default the terminal. It only makes ...
0
votes
1answer
56 views

Selectively record commands and output from terminal to MySQL table

In some situations I would like to store complete commands and output from terminal sessions in a MySQL database. Ideally I would just copy the command and output from the terminal to my clipboard ...
1
vote
2answers
94 views

Ctrl-z doesn't work in vi launched from Gnome terminal

I'm trying to switch Vi launched from Fedora Gnome terminal to background and go back to bash with Ctrl-Z but it doesn't seem to do anything.
97
votes
7answers
12k views

How to kill a runaway cat?

Many times I accidentally run the cat command on files that have contents up to few thousand lines. I try to kill the cat command with Ctrl+ C or Ctrl+Z, but both only take effect after the total ...
1
vote
0answers
86 views

Unable to create a configuration directory for [FishShell] Please set the $XDG_CONFIG_HOME variable

I'm getting this error when starting fishshell: melanie:~ melanie$ fish fish: Unable to create a configuration directory for fish. Your personal settings will not be saved. Please set the ...
0
votes
0answers
33 views

Errors on start of iTerm in Mac

I am getting two errors on startup of iTerm terminal on Mac OS X Yosemite. They are: bash: 1.25.32: command not found bash: Welcome: command not found I am unable to find a definitive resource on ...
2
votes
0answers
37 views

What are the benefits of using Tmux at all times? [closed]

I have been using the terminal for all of my local work, and have only been using tmux when I am ssh'd onto another machine and want to make sure I don't lose work if the connection closes. A software ...
0
votes
1answer
111 views

Sudo command not working on Intel Galileo Gen 1

I have an Intel Galileo Gen 1 Arduino board and I am using it over SSH with Ethernet. When I try to use the sudo commands the bash terminal reports this, a missing command! I am using the bigger Linux ...
1
vote
2answers
56 views

How to get a positive signal upon the successful completion of a command

For each of the following commands (four in total) I would like get an exception if one of them throws an exception if case of an error. Ultimately, I will run this through Python using os.system(). ...
4
votes
0answers
139 views

Change Zsh theme in Android Studio

I've recently jumped ship to zsh and I'm using the Oh my Zsh! theme blinks. It looks very nice in the OSX Terminal, but it looks very bad in Android Studio's terminal. So my question is is there a ...
1
vote
1answer
69 views

Is there a /dev/pts alternative on Mac OSX?

I'm attempting to determine how many terminal windows are open, as described in this Q&A answer. However there doesn't seem to be a /dev/pts on Mac OSX. Is there an alternative to this?
4
votes
1answer
695 views

Untar a specifc folder within tar.gz

How do I untar/uncompress a specific folder within a tar.gz using the terminal/commandline (Ubuntu 14.04 (Trusty Tahr))? Precise: -file.tar.gz -- folder1 -- folder2 How to extract... ... ...
0
votes
0answers
714 views

CentOS 7 add new user with root privileges

I am reading this tutorial, and trying to create a new user with root privileges and then block root access via ssh in a CentOS 7 server. The problem is that the new user is blocked from doing root ...