Linux command
surf 命令
网络
复制后可按需替换文件名、目录或参数。
常用示例
Open a URL
surf [https://example.com]
Embed into tabbed
tabbed surf -e
Open with specific window geometry
surf -g [800x600] [https://example.com]
Open in fullscreen mode
surf -F [https://example.com]
Disable JavaScript
surf -s [https://example.com]
Disable images and cookies
surf -i -k [https://example.com]
Embed surf into another window
surf -e [window_id] [https://example.com]
Print the X window ID
surf -x [https://example.com]
说明
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.
参数
- -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.
FAQ
What is the surf command used for?
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.
How do I run a basic surf example?
Run `surf [https://example.com]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -b do in surf?
Disable scrollbars.