Открыть вторую консоль линукс

How to display more than 1 terminal simultaneously

Sometimes when I work, I use more than one terminal and I find it inconvenient to switch between them when all of them were invoked using Ctrl + Alt + T . Is there any program or terminal that after launching would provide me with 4 independent terminals each of them would occupy ¼ of the screen while making it easy to switch between them, for instance by using the Tab key?

The [TAB] key is already used for auto completition in the terminal. If you were to swich the instances by e.g. [ALT]+[TAB] , it really would be easier to use positioned windows instead as suggested by @Zacharee1 .

I would have to open multiple terminals and resize it everytime I start working. It would kill one of the best advantage of Linux: customizability.

use uxterm as terminal emulator ( sudo apt-get install xterm ), it’s the Unix standard, and you can invoke it multiple times and arrange them on the display as you see fit

12 Answers 12

sudo apt-get install terminator 

Terminator 4 windows

For four terminals at start-up, do the following:

  • Start terminator
  • Split the terminal Ctrl + Shift + O
  • Split the upper terminal Ctrl + Shift + O
  • Split the lower terminal Ctrl + Shift + O
  • Open Preferences and select Layouts
  • Click Add and enter a usefull layout name and Enter
  • Close Preferences and Terminator
  • Open Terminator with this command:
terminator --maximise --layout=
terminator --maximise --borderless --layout=

Jump between the terminal windows with Ctrl + Tab .

You can assign your personal terminator command to Ctrl + Alt + T in Keyboard Settings > Shortcuts. (Thx @Wilf)

Of course you can also create a terminator.desktop file. Copy the original desktop file and make your changes:

cp /usr/share/applications/terminator.desktop ~/.local/share/applications/ nano ~/.local/share/applications/terminator.desktop 

Is there any way to set which terminal window is active after start ?? When I launch it active window is at the bottom and I would like active terminal window to be at the top but I cant handle it.

Unfortunately I can’t recommend Terminator these days. As cool as it used to be, the project is now pretty much unmaintained, and uses an ancient (~4 years old) version of VTE (which is the widget doing the actual terminal emulation). That is, while it’s cool to have many windows next to each other, what’s happening inside each window will suffer from many issues. See also bugs.launchpad.net/terminator/+bug/1030562

@A.B. yes I know, that branch contains my work 🙂 While it uses the most recent and much better VTE, the UI around it (Terminator itself) is heavily work-in-progress with quite a few bugs that are not present in the default Gtk+-2 version. Your answer with the apt-get install terminator command clearly refers to the Gtk+-2 version that uses ancient VTE. For reference it’s indeed useful to mention the Gtk+-3 version which is not yet stable and not yet shipped by Ubuntu, but someone might try out.

You can start 4 Terminals with Ctrl + Alt + T and fit them to the edges of your screen with Ctrl + Alt + Numpad[1,3,7,9] or left/right with Ctrl + Alt + Numpad[4/6] or top/bottom Ctrl + Alt + Numpad[8/2] and switch with Alt + Tab to ONE Terminal and with Alt + key above Tab between the terminals if one is active.

You can use tabs with Ctrl + Shift + T and switch between the terminals with Alt + Page-Up / Page-Down .

As another alternative, I would suggest using byobu .

Byobu is a GPLv3 open source text-based window manager and terminal multiplexer. It was originally designed to provide elegant enhancements to the otherwise functional, plain, practical GNU Screen, for the Ubuntu server distribution. Byobu now includes an enhanced profiles, convenient keybindings, configuration utilities, and toggle-able system status notifications for both the GNU Screen window manager and the more modern Tmux terminal multiplexer, and works on most Linux, BSD, and Mac distributions.

The advantage is that it is text-based, meaning you can use it without a graphical environment! This is very useful when dealing with servers, which often don’t have a GUI.

You even have a bottom status bar with a lot of useful information, like the date/time, the load average, etc.

The shortcuts you have to know if you use Byobu are:

  • F2 creates a new tab.
  • Shift + F2 creates a new split tab (this splits your current tab horizontally).
  • F3 and F4 to switch between tabs.
  • F9 to configure Byobu.

sudo apt-get install byobu will install Byobu.

As a bonus, being a terminal multiplexer, it means you won’t lose your session and your tabs if you closed the terminal by mistake. And you can run byobu in another terminal and get synchronised outputs.

There are even scripts to save the layouts if you wish to persist the session across reboots.

Personally, I use emacs with M-x ansi-term or M-x shell depending on what I am doing.

But if you are looking for just a terminal multiplexer then there is always the quietly revered tmux :

Edit: JoKeR pointed out that you can install tmux with apt-get :

Just resize your terminal windows, so they all fit a corner of the screen. The Terminal can also have tabs, which might help out. Right click the window and select New Tab .

Here’s how to make windows able to resize to corners:

  1. Run sudo apt-get install compizconfig-settings-manager .
  2. Run sudo ccsm or search ccsm in Unity Dash.
  3. Scroll down until you find Grid , under Window Management . Make sure it is enabled.
  4. Go to the Corners / Edges tab and change the Corner options to their corresponding corners.

Then I am not able to look at all tabs in the same time and I have to resize it everytime I open terminal.

@Bundy there is a way to make it so windows resize to a quarter of the screen when dragged to a corner. Let me find it, and I’ll add it to my answer.

You can use tmux, a terminal multiplexer.

For four panels you can use this script 4pSession , create the script with

mkdir -p ~/bin touch ~/bin/4pSession chmod +x ~/bin/4pSession nano ~/bin/4pSession 
#!/usr/bin/env bash # if the session is already running, just attach to it. tmux has-session -t 4panel if [ $? -eq 0 ]; then sleep 1 tmux attach -t 4panel else tmux new-session -d -s 4panel tmux split-window -v tmux split-window -h tmux select-pane -t 0 tmux split-window -h tmux select-pane -t 0 tmux -2 attach-session -d fi 

Than you can create a desktop file:

nano ~/.local/share/applications/tmux.desktop 
[Desktop Entry] Name=tmux Comment=a terminal multiplexer Exec=//4pSession Icon=terminal Terminal=true Type=Application Categories=Terminal; 

Move between the panes with Ctrl + B and than → or ← or ↑ or ↓

enter image description here

My crude contribution to this question: install wmctrl and adjust the script bellow,that opens and positions four terminal windows, to your screen. First find out the size of your screen with xwininfo -root and then adjust -e parameters (they are in this order 0,x-position,y-position,width,height). Numbers I use bellow are just example

#!/bin/bash # Author: Serg Kolo # Date: 2/18/2015 # Description: Open 4 terminals and position them gnome-terminal -t WINDOW-ONE & gnome-terminal -t WINDOW-TWO & gnome-terminal -t WINDOW-THREE & gnome-terminal -t WINDOW-FOUR & sleep 0.5 wmctrl -r WINDOW-ONE -e 0,0,0,500,250 & sleep 0.5 wmctrl -r WINDOW-TWO -e 0,0,384,500,250 & sleep 0.5 wmctrl -r WINDOW-THREE -e 0,500,0,500,250 & sleep 0.5 wmctrl -r WINDOW-FOUR -e 0,500,384,500,250 & 

You could bind this as a shortcut, for instance to Ctrl+I or whatever. Another idea, without installing wmctrl, is to open 4 —geometry= option

I would strongly recommend tmux. It offers a whole lot of customizations and total independence from the mouse (if that is concern). You can split screens horizontally, vertically, switch between them with some keystrokes, leave sessions open and reconnect to them later, etc.

1. If you are using centos, you can head over to link to grab the latest rpm and install it. If you get errors about dependencies, I came across an excellent tutorial here: link 2. If you are on Ubuntu, it is simple: sudo apt-get install tmux 3. If you are comfortable compiling packages, then there is the source code on sourceforge: link

With 4 terminal windows open, and while working in one of them, I can simply switch among them with Alt+` (left tick) if want to use keyboard, or simply click on the launcher icon of the terminal to bring up all its windows and click on the chosen one.

enter image description here

My installation is Ubuntu 14.04, with the default (Unity 3D) desktop, and updated to-date.

I don’t get it why people complicate things and install 3rd party products when the default Ubuntu installation already provides the feature.

you can use Gnu Screen for this also, and use a vertical split, and horizontal split.

you can put these in your ~/.screenrc config file. I have been able to split using most any gnu screen, with proper adjustments to .screenrc file.

Some combo of below should do you in your .screenrc .

screen -t tl 1 bash split focus down screen -t bl 3 bash split -v focus down screen -t br 4 bash select 1 split -v focus down screen -t tr 2 bash 

I had it set for 6 screen once. heres my residual config from that

 30 ## 1 a local bash 31 # screen -t host03 1 bash 32 #sessinoname blamb1 33 34 ## 2 ssh to host04 35 # split -v 36 # focus 37 # select 2 38 # resize -6 39 # screen -t host04 2 ssh host04 40 # caption string "%XXXXXXX" 41 42 ## 3 bashed 43 # focus 44 # select 1 45 # split 46 # focus 47 # select 3 48 # screen -t bashed 3 bash 49 #exec ssh host04 50 # caption string "%XXXXXXX" 51 52 ## 4 bashedup 53 # split 54 # focus down 55 # screen -t bashedup 4 bash 56 # caption string "%XXXXXXX" 57 58 ## 5 compass 59 # split 60 # focus down 61 # resize -14 62 # screen -t compass 5 bash 63 # leave caption commented till resize works 64 #caption string "%XXXXXXX" 65 66 #focus up 67 68 69 ## 5mysql 70 # exec mysql -p 71 # screen -t mysql 5 mysql 72 73 ## 6php 74 # screen -t php.ini 6 vim /etc/php/php.ini 75 # select php.ini 76 # chdir /etc/php 77 # exec vim php.ini 

Источник

Как открыть несколько терминалов в Ubuntu Linux

Как запустить два экземпляра терминала в Ubuntu – отобразить более 1 терминала одновременно.

Узнайте о методах открытия нескольких экземпляров терминала bash в Ubuntu.

Способ 1

Перейдите в строку меню и нажмите меню «Терминал», а затем выберите опцию «Создать терминал».

Это немедленно откроет новое окно терминала, дополнительно.

Способ 2

Нажмите и удерживайте клавиши CTRL + SHIFT + N одновременно.

Это сочетание клавиш создаст новое окно терминала.

Способ 3

Командная строка способ открыть другой экземпляр терминала, запустив следующую команду:

Способ 4

Откройте Heads-Up Display (HUD), а затем введите «Терминал» в поле поиска.

Нажмите на него, чтобы открыть новое окно терминала.

Это окно будет полностью отличаться от обычного.

Способ 5

Просто нажмите комбинацию клавиш CTRL +ALT + t

itisgood
Разработка сайта электронной коммерции: 5 вещей, которые вы должны знать, прежде чем начать
Как проверить файл fstab в Linux

You may also like

📜 Чтение файла построчно на Bash

📧 В чем разница между IMAP и POP3

✔️ Как управлять контейнерами LXD от имени обычного.

📜 Руководство для начинающих по созданию первого пакета.

Феноменальная популярность электроники Xiaomi: основные причины

📜 Получение вчерашней даты в Bash: Практическое руководство

Использование специальных гелей при мышечных болях

📦 Как расширить/увеличить файловую систему VxFS на Linux

Услуги по размещению серверного оборудования в ЦОД

Для чего выполняется ИТ консалтинг на предприятиях?

Leave a Comment Cancel Reply

• Свежие записи

• Категории

• Теги

• itsecforu.ru

• Страны посетителей

IT is good

В этой статье вы узнаете, как удалить удаленный Git-репозиторий. Процесс прост, но его полезно запомнить, чтобы избежать неожиданностей в будущем. Git – это…

В 11-й версии своей операционной системы Microsoft серьезно переработала интерфейс и убрала несколько привычных функций. Нововведения не всем пришлись по душе. Мы дадим…

Продажа ноутбука нередко становится хлопотным занятием. Кроме поиска покупателя, продавцу необходимо подготовить устройство перед проведением сделки. Но если последовательно выполнить все шаги, ничего…

Вы можете оказаться в ситуации, когда вам нужно использовать скрипт шелла для чтения файлов построчно. В этом руководстве я расскажу о нескольких способах…

Вторичное жильё выгоднее для молодых семей, желающих приобрести свою первую квартиру. Сталкиваясь с ипотечным кредитованием, можно избежать много лишней суеты и проблем, если…

Источник

Читайте также:  Установка плагина криптопро эцп browser plug in astra linux
Оцените статью
Adblock
detector