Difference between pages "Package:Tmux" and "Install/pt-br/Kernel"

(Difference between pages)
 
 
Line 1: Line 1:
{{Ebuild
+
<noinclude>
|Summary=Terminal multiplexer
+
{{InstallPart|Kernel Installation}}
|CatPkg=app-misc/tmux
+
</noinclude>
|Maintainer=
+
=== Kernel ===
|Homepage=http://tmux.sourceforge.net/
+
}}
+
Tmux is a terminal multiplexer (just as [[Package:Screen (Terminal Multiplexer)|screen]], which is generally installed by default on servers). It enables you to run multiple terminals in one. You can arrange them in multiple tabs that you can split into multiple panes as well.
+
  
== Installation ==
+
Starting mid-May 2015, Funtoo Linux stage3's include a pre-built {{c|debian-sources}} kernel to make installation faster and easier. To see if debian-sources is installed, type:
  
<console>
+
{{console|body=
###i## emerge -a tmux
+
(chroot) # ##i##emerge -s debian-sources
</console>
+
Searching...   
 +
[ Results for search key : ##b##debian-sources##!b## ]
 +
[ Applications found : ##b##1##!b## ]
  
== Getting Started ==
+
*  ##b##sys-kernel/debian-sources##!b##
 +
      ##g##Latest version available:##!g## 3.19.3
 +
      ##g##Latest version installed:##!g## 3.19.3
 +
      ##g##Size of files:##!g## 81,292 kB
 +
      ##g##Homepage:##!g##      http://www.debian.org
 +
      ##g##Description:##!g##  Debian Sources (and optional binary kernel)
 +
      ##g##License:##!g##      GPL-2
 +
}}
  
To launch Tmux, run <code>tmux</code> in a terminal. This should clear your current terminal and display a <i>status bar</i> on the bottom. In this status bar, you should see something like <i>"[0] 0:bash*"</i>. This means you are on session 0 (<b>[0]</b>), window 0 (<b>0:</b>) and you run "bash".
+
If a version is listed under {{c|Latest version installed}}, then debian-sources is already pre-built for you and you can skip the rest of the Kernel section, and proceed to the [[#Installing a Bootloader|Installing a Bootloader section]].
  
Tmux uses <b><code>Ctrl+b</code></b> as default prefix. This means that before issuing any command you will have to hit <b><code>Ctrl+b</code></b> to tell tmux you are asking <i>it</i>. For instance, type <b><code>Ctrl+b</code></b> and then <b><code>%</code></b>. This should split vertically the window to add a new pane. Now issue <b><code>Ctrl+b "</code></b>, this will split the new pane horizontally to create a new pane. You can switch against panes with <b><code>Ctrl+b Left/Up/Right/Down</code></b> (Left/Up/Right/Down being the arrow keys).
+
==== Building the Kernel ====
  
Another cool stuff is windows. Splitting your window into panes is good, but for readability purpose, you can't indefinitely split your window. So you can open a new window (which would behave more like a tab) by issuing <b><code>Ctrl+b c</code></b>. Your current window will be replaced by a brand new one. However you will notice that your status bar now looks like this <i>"[0] 0:bash- 1:bash*"</i>. The minus symbol (<b>-</b>) means this is the last visited window. The asterisk symbol (<b>*</b>) means this is the current window. You can add panes to this window as well. To go back to the first window, issue <b><code>Ctrl+b 0</code></b>. Generally speaking, issue <b><code>Ctrl+b <window-id></code></b> to go to the window <i><window-id></i>.
+
If you need to build a kernel for Funtoo Linux, please follow these steps:
  
You can do much more with tmux, but this is the minimum to know if you want to quickly get started.
+
{{Fancynote|1=
 +
See [[Funtoo Linux Kernels]] for a full list of kernels supported in Funtoo Linux. We recommend <code>debian-sources</code> for new users.}}
  
== Keyboard Shortcuts ==
+
{{fancyimportant|1=
 +
<code>debian-sources</code> with <code>binary</code> USE flag requires at least 14GB free in <code>/var/tmp</code> and takes around 1 hour to build on a Intel Core i7 Processor.}}
  
{|class="table table-striped"
+
Let's emerge our kernel:
!! Shortcut !! Description
+
|-
+
|| <code>C-b ?</code> || List all keybindings
+
|-
+
|| <code>C-b :</code> || Enter tmux command prompt
+
|-
+
|| <code>C-b d</code> || Detach session
+
|-
+
|| <code>C-b c</code> || Create window
+
|-
+
|| <code>C-b n</code> || Switch to next window
+
|-
+
|| <code>C-b p</code> || Switch to previous window
+
|-
+
|| <code>C-b l</code> || Switch to last window
+
|-
+
|| <code>C-b "</code> || Split current pane into top and bottom
+
|-
+
|| <code>C-b %</code> || Split current pane into left and right
+
|-
+
|| <code>C-b o</code> || Move to next pane
+
|-
+
|| <code>C-b ;</code> || Move to previous pane
+
|-
+
|| <code>C-b [</code> || Enter copy/scroll mode (type <code>q</code> to leave this mode)
+
|}
+
  
== Configuration ==
+
<console>
=== ~/.tmux.conf ===
+
(chroot) # ##i##emerge debian-sources
Example tmux configuration shown below
+
</console>
<code>~/.tmux.conf</code> gets loaded on tmux startup.
+
{{file|name=~/.tmux.conf|lang=|desc=tmux configuration|body=
+
set -g base-index 1
+
set -g default-terminal "st-256color"
+
set -g history-limit 4096
+
set -g status-left ''
+
set -g status-right "#[bg=brightblack]#[fg=green] #T "
+
set -g status-style "bg=black"
+
  
setw -g pane-base-index 1
+
Once <code>emerge</code> completes, you'll have a brand new kernel and initramfs installed to <code>/boot</code>, plus kernel headers installed in <code>/usr/src/linux</code>, and you'll be ready to configure the boot loader to load these to boot your Funtoo Linux system.
setw -g window-status-format "#[bg=magenta]#[fg=black] #I #[bg=brightblack]#[fg=green] #W "
+
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=black] #I #[bg=green]#[fg=black] #W "
+
  
bind r source-file ~/.tmux.conf
+
{{fancynote|NVIDIA card users: the <code>binary</code> USE flag installs the Nouveau drivers which cannot be loaded at the same time as the proprietary drivers, and cannot be unloaded at runtime because of KMS. You need to blacklist it under <code>/etc/modprobe.d/</code>.}}
}}
+
  
{{EbuildFooter}}
+
{{fancynote|For an overview of other kernel options for Funtoo Linux, see [[Funtoo Linux Kernels]]. There may be modules that the Debian kernel doesn't include, a situation where [http://www.funtoo.org/wiki/Funtoo_Linux_Kernels#Using_Debian-Sources_with_Genkernel genkernel] would be useful. Also be sure to see [[:Category:Hardware Compatibility|hardware compatibility]] information.}}

Revision as of 19:06, May 28, 2015


Note

This is a template that is used as part of the Installation instructions which covers: Kernel Installation. Templates are being used to allow multiple variant install guides that use most of the same re-usable parts.


Kernel

Starting mid-May 2015, Funtoo Linux stage3's include a pre-built debian-sources kernel to make installation faster and easier. To see if debian-sources is installed, type:

(chroot) # emerge -s debian-sources
Searching...    
[ Results for search key : debian-sources ]
[ Applications found : 1 ]

*  sys-kernel/debian-sources
      Latest version available: 3.19.3
      Latest version installed: 3.19.3
      Size of files: 81,292 kB
      Homepage:      http://www.debian.org
      Description:   Debian Sources (and optional binary kernel)
      License:       GPL-2


If a version is listed under Latest version installed, then debian-sources is already pre-built for you and you can skip the rest of the Kernel section, and proceed to the Installing a Bootloader section.

Building the Kernel

If you need to build a kernel for Funtoo Linux, please follow these steps:

Note

See Funtoo Linux Kernels for a full list of kernels supported in Funtoo Linux. We recommend debian-sources for new users.

Important

debian-sources with binary USE flag requires at least 14GB free in /var/tmp and takes around 1 hour to build on a Intel Core i7 Processor.

Let's emerge our kernel:

(chroot) # emerge debian-sources

Once emerge completes, you'll have a brand new kernel and initramfs installed to /boot, plus kernel headers installed in /usr/src/linux, and you'll be ready to configure the boot loader to load these to boot your Funtoo Linux system.

Note

NVIDIA card users: the binary USE flag installs the Nouveau drivers which cannot be loaded at the same time as the proprietary drivers, and cannot be unloaded at runtime because of KMS. You need to blacklist it under /etc/modprobe.d/.

Note

For an overview of other kernel options for Funtoo Linux, see Funtoo Linux Kernels. There may be modules that the Debian kernel doesn't include, a situation where genkernel would be useful. Also be sure to see hardware compatibility information.