LinuxCommandLibrary

surf

TLDR

Open a URL

$ surf [https://example.com]
copy
Open in a new window with tabbed
$ surf.sh [https://example.com]
copy
Open with specific window geometry
$ surf -g [800x600] [https://example.com]
copy
Open in fullscreen mode
$ surf -F [https://example.com]
copy
Disable JavaScript
$ surf -s [https://example.com]
copy
Disable images
$ surf -i [https://example.com]
copy

SYNOPSIS

surf [options] [URI]

DESCRIPTION

surf is a minimalist web browser from the suckless project. It is based on WebKit/GTK+ and follows the suckless philosophy of simplicity, clarity, and frugality.
The browser has no graphical user interface elements such as toolbars or URL bars. Navigation is performed entirely through keyboard shortcuts and external tools like dmenu. Use Ctrl+g to enter a new URL, Ctrl+y to copy the current URL, and Ctrl+p to navigate to a URL from the clipboard.
Configuration is done by editing the config.h source file and recompiling, following the suckless approach. For tabbed browsing, use the companion tabbed utility with the included surf.sh script.
The source code is intentionally kept under 2000 lines for readability and auditability.

PARAMETERS

-b

Disable scrollbars.
-c file
Specify cookie file.
-d
Disable disk cache.
-e winid
Embed into window with given ID.
-f
Start in windowed mode (not fullscreen).
-F
Start in fullscreen mode.
-g geometry
Set window geometry (WIDTHxHEIGHT).
-i
Disable images.
-I
Enable images (default).
-k
Disable cookies.
-K
Enable cookies (default).
-m
Disable applying styles from the specified file.
-M
Enable applying styles from the specified file.
-n
Disable the Web Inspector (Developer Tools).
-N
Enable the Web Inspector (Developer Tools).
-p
Disable plugins.
-P
Enable plugins (default).
-r file
Specify script file.
-s
Disable JavaScript.
-S
Enable JavaScript (default).
-t file
Specify style file.
-v
Display version information.
-x
Print X window ID to stdout.

CAVEATS

Requires GTK+ and WebKit libraries. No built-in tab support; use tabbed for tabs. Configuration requires editing source code and recompiling. Install dmenu for URL bar functionality. Limited features compared to mainstream browsers.

HISTORY

surf was created as part of the suckless project, which produces software that emphasizes minimalism and clarity. It embodies the Unix philosophy of doing one thing well: displaying web pages. The browser provides a lightweight alternative for users who prefer keyboard-driven interfaces and minimal resource usage.

SEE ALSO

tabbed(1), dmenu(1), firefox(1), chromium(1)

Copied to clipboard