Window Commands

Keystrokes

Command name

Description

C-x 2

split-window-vertically

Divide the current window into two, one on top of the other.

C-x 3

split-window-horizontally

Divide the current window into two, side by side.

C-x >

scroll-right

Scroll the window right.

C-x <

scroll-left

Scroll the window left.

C-x o

other-window

Move to the other window.

C-x 0

delete-window

Delete current window.

C-x 1

delete-other-windows

Delete all windows but this one.

(none)

delete-windows-on

Delete all windows on a given buffer.

C-x ^

enlarge-window

Make window taller.

(none)

shrink-window

Make window shorter.

C-x }

enlarge-window-horizontally

Make window wider.

C-x {

shrink-window-horizontally

Make window narrower.

C-M-v

scroll-other-window

Scroll other window.

C-x 4 f

find-file-other-window

Find a file in the other window.

C-x 4 b

switch-to-buffer-other-window

Select a buffer in the other window.

C-x 5 f

find-file-other-frame

Find a file in a new frame.

C-x 5 b

switch-to-buffer-other-frame

Select a buffer in another frame.

(none)

compare-windows

Compare two buffers; show first difference.

Get Linux in a Nutshell, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.