Skip to main content

Questions tagged [terminal]

A terminal is a hardware device used for entering data into and displaying information from a computer. Terminals were frequently used in the days of mainframe computers. Today, most operating systems offer text-based "terminal emulators", which replicate the functionality of a classical terminal, also referred to as a "system console".

Filter by
Sorted by
Tagged with
402 votes
21 answers
562k views

How do I detach a process from Terminal, entirely?

I use Tilda (drop-down terminal) on Ubuntu as my "command central" - pretty much the way others might use GNOME Do, Quicksilver or Launchy. However, I'm struggling with how to completely detach a ...
user avatar
239 votes
6 answers
149k views

What is the difference between shell, console, and terminal?

I'm confused with the terminology. What is the difference between shell, console, and terminal?
claws's user avatar
  • 4,359
4 votes
1 answer
5k views

Bash terminal not wrapping text correctly [duplicate]

I am using the gnome-terminal with bash, and when I have a command that should go over the line, it just stays on the same line. So instead of: echo "abcdefghijklmnopqrstuvwxyz" I would get ...
user avatar
40 votes
2 answers
12k views

Linux: coloring bash prompt will break carriage return

When I try to colorize the bash prompt like this: export PS1="\e[0;31m[\u@\h \W]\$ \e[m " it breaks the carriage return (instead of going to a new line when line is full, it starts in the same line ...
Abonec's user avatar
  • 502
39 votes
7 answers
75k views

OSX Terminal showing incorrect hostname

When I open Terminal I expect it to show what my PS1 is set to \h:\W \u\$. However it's not displaying my hostname Eriks-MacBook, as displayed in System Preferences. Instead, it's showing a random ...
Erik W's user avatar
  • 393
103 votes
13 answers
161k views

What commands can I use to reset and clear my terminal?

I have been using the command: reset to clear my terminal. Although I am pretty sure this is not what I should be doing. Reset, as the name suggests, resets your entire terminal (changes lots of ...
sixtyfootersdude's user avatar
78 votes
7 answers
48k views

Set the title of the terminal window to the current directory

How can I get the Terminal.app in OS X to display the current directory in its window or tab title? I'm using the bash shell.
kareman's user avatar
  • 891
38 votes
3 answers
57k views

How do I fork a process that doesn't die when shell exits?

If I run emacs from the shell: $ emacs foo & and then kill that shell, emacs dies. How can I run a command so that it will not die when the shell dies? I found references to nohup, but that ...
sligocki's user avatar
  • 898
3 votes
2 answers
3k views

Echoing output to file while seeing it in console in the same time [duplicate]

So I echo output of my programs ran in terminal by command 2>&1 >> /path/toFile.txt It creates few limitations that I want to overcome: It "freezes" and gives no output in terminal - ...
Szymon Toda's user avatar
  • 1,639
2 votes
1 answer
355 views

Is there a way to have a dynamic system status area in the Linux terminal that updates while one does something else?

I'm thinking for some servers I look after, that after I SSH in to the box it would be very helpful to see things like disk usage, CPU usage and the such in the actual terminal I'm in as I’m working. ...
idic's user avatar
  • 21
0 votes
2 answers
2k views

Copying folder to multiple destinations in parallel [duplicate]

I have to transfer roughly 250gb of data from a Master Drive to lots of USB drives, all of identical size and brand. When I copy using the GUI in Mac OSX, it waits to copy all the files to one drive ...
James Harding's user avatar
131 votes
15 answers
154k views

How to force GPG to use console-mode pinentry to prompt for passwords?

Using gpg from a console-based environment such as ssh sessions fails because the GTK pinentry dialog cannot be shown in a SSH session. I tried unset DISPLAY but it did not help. The GPG command line ...
ccpizza's user avatar
  • 7,853
102 votes
4 answers
64k views

Icon? file on OS X desktop

When I ls my Desktop from terminal (by using ls ~/Desktop), I see a file named Icon?. As far as I can tell, it's empty (nano Icon? shows nothing). It doesn't show up on my actual Desktop, and open ...
Chris's user avatar
  • 1,238
22 votes
4 answers
41k views

Linux - Set default terminal size and screen position?

I can't find any settings inside the terminal profile to allow me to set a geometry size and screen x,y coordinates so that the terminal window always opens (even after reboot) in the same location on ...
TheCleaner's user avatar
  • 2,432
9 votes
4 answers
33k views

Mac OS X Terminal not logging in

I am running Mac OS X version 10.6.3 and when I open the terminal (with terminal.app or iterm) it just hangs on the login process. I've tried restarting, changing the startup command to /bin/bash, and ...
Wuffers's user avatar
  • 19.3k
8 votes
8 answers
52k views

How do I rename a bunch of files in the Command Prompt?

I have a problem with filenames. The stupid camera I am using resets the autonumber sequence every so often, and therefore I am getting tons of conflicts if I try and put lots of photos in a single ...
JohnRoux's user avatar
6 votes
5 answers
4k views

Pass mouse events through tmux

I have noticed that scrolling in tmux is a hazzle and was wondering if it was possible to have tmux pass them along to the application or terminal. I may be understanding things wrong here but I have ...
Lasse Halberg Haarbye's user avatar
5 votes
1 answer
5k views

Changing routing on Mac with two Ethernet ports

I have a Mac tower which has two Ethernet ports. One is connected to our corporate network, the other to a non-corporate network. Priority order states that the non-corporate network comes first and ...
Tony's user avatar
  • 281
67 votes
12 answers
142k views

How can I copy on select in the OS X Terminal like PuTTY does?

That PuTTY option to select and then right-click to paste is the best invention after the mouse. Is there any way to make Terminal in OS X do this? Hack the source code? Install something? Is the ...
TraderJoeChicago's user avatar
65 votes
3 answers
98k views

How to show output on terminal and save to a file at the same time?

I am using: user@unknown:~$ sudo command -option > log to save the results of "command" to the file "log", but I'd like to also get the result on the terminal, is this possible? I am using ...
fazpas's user avatar
  • 1,623
24 votes
6 answers
22k views

Save multiple gnome-terminal layout?

I have multiple gnome-terminal windows open. Is there a way to save the settings (window position, no. of tabs, title etc). across OS reboots ?
Abhinav's user avatar
  • 2,040
17 votes
4 answers
19k views

OS X Terminal command to change color themes

Is there a command that can be used to change the color scheme of the Mac OS X Terminal? I like the idea of being able to change colors depending on scripts I run. So far I am just changing the color ...
satur9nine's user avatar
15 votes
2 answers
14k views

How do I get files found by command-line 'find' ordered by modification date in OS X?

Using the Mac OS X Terminal, how do I write a find command that orders results by modification date (most recent first)? There are similar questions already, but they refer to GNU find and POSIX, but ...
zadam's user avatar
  • 355
7 votes
1 answer
23k views

How to zip multiple files into separate archives?

I admit this question was asked here before: Like Zip into separate files where the person who asked didn't specify the OS he used and received no answers. I need to separate a huge directory into ...
patrick's user avatar
  • 1,000
7 votes
2 answers
6k views

SSH without sourcing .bashrc

I was experimenting with my .bashrc file while remotely logged in to a server over SSH. I inadvertently left an exit in there that caused all subsequent logins to immediately disconnect. I was ...
j-hui's user avatar
  • 73
5 votes
2 answers
3k views

How to keep the command line prompt on the first line of terminal?

I need to keep the command line on the top of the screen and see the output of any command below it. How can I achieve this using any available tools on any platform? Currently, on the all terminal ...
Real Dreams's user avatar
  • 5,078
2 votes
2 answers
2k views

Clear Windows Terminal + cmd.exe from .bat file

I am using Windows Terminal along with a batch file that runs cls as the first command. Under standalone cmd.exe running cls clears the window and scrollback. Under Windows Terminal, it does not clear ...
Phrogz's user avatar
  • 1,030
1 vote
2 answers
2k views

How to open files with forward dash in linux

I need to open a file with filename that contains forward slashes. I am wondering how I can do that. I have been searching through Google and I can't seem to find a way. Thanks
Gnator's user avatar
  • 11
309 votes
10 answers
951k views

How do I find a file by filename in Mac OSX terminal?

I want to find a file on my Macbook with the filename: abc.dmg. I've tried to use spotlight, but it doesn't find it. When I tried find, and used: find -name abc.dmg -path /, I got errors back. What ...
SPRBRN's user avatar
  • 7,812
85 votes
11 answers
295k views

How to get vertical split of terminal in Mac to execute different actions?

Every once in a while I see people using what looks like terminal in their Mac, except that in what seems to be one window they have a vertical 'split.' On one side of the split, they have emacs or ...
Tony Stark's user avatar
  • 2,370
84 votes
5 answers
75k views

How can I change the keyboard shortcut for switching tabs in Mac Terminal?

I know that you can switch tabs with shift cmd [arrow key] in Mac Terminal, but it is painful to reach the arrow key. How can I change the default keybinding?
Léo Léopold Hertz 준영's user avatar
60 votes
5 answers
45k views

How can I partially clear my terminal scrollback?

I want to partially clear my terminal scrollback history, but only from where I have selected with my mouse in the scrollback and up. Is this possible? I'm on a Mac, and I use iTerm2 and Terminal.
Javid Jamae's user avatar
54 votes
3 answers
25k views

Use terminal scrollbar with tmux

I know how to scroll in tmux using the keyboard, but I noticed that it looks like there's a way to use the terminal scrollbar with GNU Screen. Can this be done with tmux?
Jeff's user avatar
  • 1,787
50 votes
1 answer
155k views

chown - Operation not permitted

I'm logged in as minime. I don't understand why it doesn't allow me to chown file that I own without su privileges. Obviously I can use sudo, but I'd like to understand why? because of www-data group?...
user avatar
48 votes
11 answers
35k views

Open a new tab in the same directory

Say you are in /very/cool/and/deeply/nested/folder . And you want to open a new terminal tab in the same folder. How would you do that? I use Mac OS and Zsh.
Nerian's user avatar
  • 1,307
48 votes
2 answers
70k views

How to send the escape character on OS X terminal?

Connecting with telnet looks like this: $ telnet some.host Trying 10.1.2.3... Connected to some.host. Escape character is '^]'. I'm running this on the OS X Leopard terminal. Question is, how do I ...
Ville Laurikari's user avatar
35 votes
2 answers
28k views

Making 256-color AND Line drawing characters both work in PuTTY

I'm having trouble setting up PuTTY with Ubuntu. I'm trying to get line characters to work in aptitude as well as 256-color support, but can only get one or the other. Ubuntu Config Using 64-bit ...
Swiss's user avatar
  • 516
30 votes
13 answers
41k views

Undo the Linux trash command

Can we undo operations done in a terminal, for example, file deletion through rm? Solutions obtained: Aliasing Undelete utilities Backup utilities LibTrash Versioning (FUSE)
cdb's user avatar
  • 1,079
29 votes
5 answers
27k views

TTY with 256 colors?

With URxvt and xterm it is possible to use a virtual terminal supporting 256 colors instead of only eight. Since my Intel GMA graphics card is well-supported by the KMS framebuffer driver, I am ...
timn's user avatar
  • 926
19 votes
4 answers
21k views

How do I set up an AppleScript to open a new iTerm2 tab and change the directory?

In OS X, how do I set up an AppleScript to open a new iTerm2 tab change to a directory clear the console echo the current directory I had something like this before for regular Terminal, but I can'...
cwd's user avatar
  • 18.2k
14 votes
4 answers
34k views

in linux console, how to NOT wrap output

In a (linux) terminal, sometimes it is less important to see line endings, but more important not to clutter the line startings. e.g. line1 sddd dd ddd line2 sdafss ss s line 3 da aaaa aa rather ...
Berry Tsakala's user avatar
12 votes
2 answers
7k views

Make OS X Terminal commands I type BOLD

I'd like to make commands I've typed (input) into terminal stand out from all the output. For example: imac:~ buster$ chmod -R g-w myfolder imac:~ buster$ cd myfolder imac:myfolder buster$ ls -l ...
Meltemi's user avatar
  • 6,987
10 votes
7 answers
33k views

scp from remote Linux to local Windows with spaces in local path

To push a file from a Linux terminal to a Windows system, the following two examples work just fine. scp /home/user.name/file.html [email protected]:/C:/Users/user.name/test_folder/file.html ...
Clay's user avatar
  • 561
8 votes
4 answers
4k views

Terminal: prefix previous command?

Frequently in Terminal (though I fully expect any answer will work in bash and most others), I type some command, and then get some sort of permission error due to missing sudo. Okay, so press 'up', ...
OJFord's user avatar
  • 621
8 votes
1 answer
2k views

Why is pasted text highlighted in macOS Catalina's Terminal?

On macOS Catalina, when I copy text and paste to Terminal, the text is highlighted (basically, there are ANSI color codes enclosing the text). I don't know when this feature was included, but is there ...
user1424739's user avatar
7 votes
1 answer
977 views

bash: per-command history. How does it work?

OK. I have an old G5 running Leopard and a Dell running Ubuntu 10.04 at home and a MacPro also running Leopard at work. I use Terminal.app/bash a lot. On my home G5 it exhibits a nice feature: using ↑...
romainl's user avatar
  • 23k
4 votes
1 answer
7k views

All commands are not working on Mac OS X Lion

I am faced with a problem, that I can't run even a single command on my Mac OS X Lion terminal, even "ls" command, when i print $PATH variable, found My-Mac:/ Mac$ echo $PATH /usr/local/git/bin ...
Shahrukh A.'s user avatar
3 votes
2 answers
5k views

Why is the name of my computer wrong in terminal?

I just transfered all of my files and settings over to a new laptop using Migration Assistant (on a mac). The name of my computer in terminal is wrong for some reason. It's unknown20c9d042dc93 The ...
DontTurnAround's user avatar
2 votes
3 answers
4k views

How can I make `clear` preserve entire scrollback buffer?

Whenever I run clear in my terminal, it deletes the scrollback buffer from the top of visible part of the screen to the current line. I have tried it in multiple terminal emulators and the problem ...
Manoj's user avatar
  • 123
1 vote
1 answer
964 views

Terminal new window always shows -bash: Searching: command not found

When open terminal, it always shows -bash: Searching: command not found. It does not affect other functions, just each time, even though open a new terminal window, it still pops up at the top of the ...
CarolineGao's user avatar

1
2 3 4 5
8