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

3
votes
1answer
42 views

Where are characters typed into a terminal saved?

Using xterm and bash 4.3 from the (pseudo-)terminal pts/10 we type (█ is the cursor): test@debian:~$ ps PID TTY TIME CMD 13128 pts/10 00:00:02 bash 21037 pts/10 00:00:00 ps test@debian:...
0
votes
2answers
40 views

Launch top command showing all cores immediately

I know that once you run top if you press [1] you can see the load on each processor (let's forget the multi-threading issue) and if you press [s] you can configure the refresh time. How can I put ...
9
votes
3answers
3k views

command line method or programmatically add ssh key to github.com user account

Is there a way to identify with a username and password to github.com servers for the purpose of adding an ssh key to the github user account? So far everything I've read suggests that a user's ssh ...
0
votes
0answers
29 views

Is “<command> &” same as demonizing a process in Linux? [duplicate]

We all know that any command succeeded by ampersand (&) makes it run in the background. Can we use it instead of demonizing tools? For example: In order to run nodejs server, we use use packages ...
3
votes
2answers
86 views

How can I type a command to execute when the current command completes?

I have a function (not) that displays a notification. Hence, I can use it to show when a command is complete. sleep 5; not However, sometimes I forget to add ;not. In OS X's terminal (a few years ...
-1
votes
1answer
22 views

Lock a Application Through Terminal

I was wondering if it were possible to lock a Application through Mac Terminal. I know there's a way to lock files, using chmod a+x 000 'directory', but it never worked with an Application. What I ...
3
votes
2answers
149 views

What are the keyboard shortcuts for the command-line?

I'm talking about the keyboard shortcuts that you use in command-line/terminal. Example: Ctrl+c that kills the process, Ctrl+d that logout, Ctrl+z that send process to background... etc. I've tested ...
1
vote
0answers
330 views

Error “dircolors: no SHELL environment variable, and no shell type option given”

Running Linux Mint 17.3 Cinnamon A while ago a created a script that changed the colors in the Terminal (to match a tutorial I was following) However if I open the terminal on another account, I get ...
27
votes
2answers
10k views

How do I start all shell sessions in a directory other than $HOME?

When I open my non-login shell in Ubuntu, my present working directory is /home/user_name (my $HOME environment variable), but I want to change this such that when I start my terminal I am in some ...
4
votes
1answer
620 views

Logging interactive input and output without capturing all typed input and control characters

I am trying to log output from an interactive command-line program; units, specifically. I have tried using tee like this: units | tee units.log or script like this: script -c units units.log ...
0
votes
0answers
80 views

Run mate-terminal on startup as root without password

I am using Linux Mint 17. I want to run mate-terminal on startup as root without need to type password (I want it to perform automatically) and execute python script in it without closing terminal ...
0
votes
2answers
173 views

Terminal vs Terminal emulator [duplicate]

I am trying to clarify my understanding of terminal here. Terminal is actually a device (keyboard+monitor). When in CLI mode, the input from your keyboard goes directly to shell and also displayed on ...
1
vote
1answer
90 views

How can I use the host's keyboard for a 'remote' SSH session from a tablet computer?

The perhaps slightly odd requirement is this: I have a computer/laptop running Ubuntu I have an iPad from which I can SSH into said laptop sitting right next to it I'd like to use the iPad as an ...
1
vote
1answer
48 views

shell command cd !$ [duplicate]

I looked at this question and googled, but can't find a definitive answer. What does !$ do when typed into terminal? I typed mkdir /path/to/dir cd !$ Which brought me to /path/to/dir but I still ...
10
votes
2answers
11k views

Execute command in remote active terminal

Suppose you have a terminal emulator (T1) open with a PID of 6350. From another terminal, type this command (C1): echo "ls\n" > /proc/6350/fd/0 This writes ls and the new line in T1 but does ...
2
votes
1answer
555 views

Where are gnome-terminal profiles stored on a linux distribution?

Of the distributions of Linux I have used (Red Hat, Ubuntu, CentOS, others) which utilize gnome-termial you are able to set different terminal profiles via a drop down menu located in the terminal ...
1
vote
2answers
988 views

Mac OS X: Terminal Prompt Username

I'm using Mac OS Snow Leopard (v10.6.8). I've changed the account name under System Preferences > System > Accounts > Full Name. However, that does not change the username on the terminal ...
1
vote
1answer
29 views

Change the current directory when a terminal is opened

Always which I opened the terminal, on the Linux Mint, the directories which the terminal started is: /home/user. How I changed this default directory to another, e.g. /home/user/Download?
0
votes
0answers
44 views

how to program the terminal emulator so it can trigger actions based on action keys

I want to see what happens when for example I press ctrl + alt + t on terminal. I want to view some logs for it and want to reprogram the behavior for it so when pressing ctrl + alt + t it not only ...
52
votes
4answers
78k views

How to recover a 'lost' screen session?

Somehow I managed to close a screen window without screen 'noticing' it, so the session is still flagged as attached. This prevents me from re-attaching to this session. What can I do? me@iupr-serv8:~...
2
votes
3answers
4k views

Sublime command line open it twice

I just created a symbolic link to sublime: $ sudo ln -s /opt/SublimeText2/sublime_text /usr/bin/subl The problem is that it opens the last project and the open I want: $ subl my-project or $ ~/...
1
vote
3answers
913 views

How to display size “human-readable” in lsof | grep /var* [duplicate]

I am currently trying to see , all the files which are using /var mount. With lsof | grep /var* when Its displaying size in bytes. How can I display file size in MB. Thank you.
2
votes
2answers
156 views

Understanding Return, Enter, and stty icrlf

In Ubuntu/gnome-terminal, if I run: $ stty -icrnl Then launch the GHC interactive environment (a Haskell console): $ ghci Then pressing Return does not submit the line; however, Enter does. ...
3
votes
1answer
26 views

command-click git commit ID in Terminal, and be taken to that commit in github?

I'm running a Mac and use iTerm with ZSH as my shell. Currently I can command-click (⌘+click) on links or directories in my iTerm window, and that directory or web link will open. Is there a way (...
0
votes
1answer
75 views

control-w (delete word) deletes whole line in MariaDB client

I've been using the original MySQL client for "eons" and I'm rather accustomed to using bash-like shortcuts in it. One of my more frequently used ones is to use control-w to delete the word before the ...
1
vote
1answer
134 views

How can mouse support be enabled in terminal Emacs?

How can mouse support be enabled in an Emacs terminal session started with emacs -nw? Is there a keyboard shortcut or a flag to do this? If not how can it be done in terminal emulators? I use Guake.
27
votes
4answers
20k views

How to remove “You have mail” welcome message

When I open up my terminal it says "you have mail", anyone has any idea of why? I am running OS X, but since it too is based on Unix and relies on files such as bashrc, bash_profile etc. I thought ...
0
votes
1answer
38 views

How to run command after entering postgres

I am trying to execute ls after opening a new Guake tab and logging into postgres. guake -n guake -e 'sudo -i -u postgres && ls' The command successful opens a new tab then prompts me for ...
0
votes
1answer
26 views

How to fix my terminal prompt being out by a character? [duplicate]

My terminal prompt is set using the following configuration in my .profile file: # Prompt GREEN=$(tput setaf 2) LIME_YELLOW=$(tput setaf 190) MAGENTA=$(tput setaf 5) WHITE=$(tput setaf 7) NORMAL=$(...
0
votes
0answers
24 views

How do I execute a command if a drive is not mounted?

I am trying to create a shell script to mount a LUKS volume if it is not already mounted. The LUKS password will be in the shell script. The shell script is being stored in a encrypted folder so it is ...
0
votes
2answers
748 views

How can I use fdisk to create a ntfs partition on /dev/sdx?

I would like to know how to create a ntfs partition on /dev/sdx. I could not figure out if I should use partition type 7 86 or 87. What is the full list of commands to use?
1
vote
1answer
54 views

How can the read/write speed of a partition or drive be measured? [duplicate]

How can I preferable from the terminal measure the read and write speeds of /dev/sdx?
-3
votes
1answer
65 views

What does root directory mean? [closed]

What does it means when they say "Move into the root directory of the kernel you wish to patch" please explain me in detail cause I'm new to this environment.
17
votes
2answers
57k views

Connect to a Bluetooth device via Terminal

I'm using Mint 15 w/ cinammon. I bought a set of bluetooth speakers and i'm tring to connect to them via terminal. Via GUI i can see them normally and i am connected to them. I want to make a small ...
2
votes
0answers
80 views

Making vim the default editor when I double click a file

When I run vim from the start menu, it opens up an xfce terminal window and runs vim. However, when I set vim to be my default text editor and double-click a file, it runs in xterm instead of the xfce ...
2
votes
1answer
59 views

Clear to end of line uses the wrong background color in screen

In ZSH prompt expansion, the command %E is supposed to "Clear to end of line." This works. We see it in the grey bar going all the way across. However, if I call "screen", the %E stops working: ...
3
votes
1answer
78 views

Clear to end of line uses the wrong background color in tmux

In ZSH prompt expansion, the command %E is supposed to "Clear to end of line." This works: However, it does not work in tmux: The issue seems to be with BCE (Background Color Erase). In screen, I ...
1
vote
1answer
28 views

Terminal based Norton Commander program

I am looking for a terminal-based file manager like the good old Norton Commander or Total Commander...but all I have found so far are graphical and hence don't run in terminal. Is there any?
2
votes
1answer
85 views

Scroll by line in terminal rather than by page Shift + PgUp

Is there a keyboard way to scroll the terminal by line the same way we scroll with mouse wheel? Shift+PgUp/PgDown give only by-page scrolling. I would like to scroll slowly as with mouse wheel. My ...
2
votes
1answer
114 views

How is sudo interrupted in xterm on Ctrl-C? [duplicate]

Please explain in detail (including tty related stuff) how is a sudo foreground process on a X terminal emulator actually killed on the Ctrl-C. See the following example please: $ sudo -u test_no_pw ...
9
votes
4answers
5k views

“Friendly” terminal color names in shell scripts?

I'm aware of libraries in languages such as Ruby and Javascript to make colorizing your terminal scripts easier by using color names like "red". But is there something like this for shell scripts in ...
3
votes
3answers
222 views

common environment variable to set dark or light terminal background

I have written a number of debuggers that all can colorize source code text shown in a terminal session. They all understand that some terminals have a dark background and some have a light background ...
1
vote
1answer
238 views

CentOS 7 Encrypt a PDF

I've recently upgraded our server from CentOS 6 to CentOS 7 and I am having issues getting pdf encryption working on it. On CentOS 6 I installed libgcj and then the pdftk package. I could then ...
7
votes
1answer
1k views

bash: no job control in this shell

I have a minimal Linux system. init is /bin/bash, only bare minimum of libraries in /lib/, /dev/ is populated statically, no daemons running (no udev, ..) When bash starts, I get following error: ...
8
votes
3answers
8k views

Effect of $LANG on terminal

I'm trying to learn how the $LANG variable behaves with gnome-terminal (and its character encoding preference option). I've been using iso8859-1 (latin1) as my main character-set and all my filenames ...
0
votes
0answers
48 views

Set a ZSH shell variable using mintty?

I have configuration files that I use to make my PS1 fancy. The design depends on the presence of a particular font. If the font isn't present, the PS1 looks ugly. I share access to a webmaster ssh ...
1
vote
1answer
36 views

running commands from files [closed]

Let's say that I write some commands in a file let's say cmake although it doesn't need to be cmake run writing some commands in a text file. example filename: cmake_command cmake -DCMAKE_BUILD_TYPE=...
4
votes
2answers
76 views

Take high quality screenshots of my terminal window

I'm writing a book and sometimes I must show some screenshots taken from my terminal window. Problem is they are not good for print, so I need to increase their quality (resolution). Is there any way ...
2
votes
1answer
169 views

Using Incrond Inotify but having issues with user groups/permissions

In the /etc/incron.allow I added both: root USER_1 Then I edited the incrontab so it looks like this: /var/www/laravel/public/js/main.js IN_MODIFY yui-compressor -o /var/www/laravel/public/js/main....
698
votes
5answers
164k views

What is the exact difference between a 'terminal', a 'shell', a 'tty' and a 'console'?

I think these terms almost refer to the same thing, when used loosely: terminal shell tty console What exactly does each of these terms refer to?