• Xshell 使用技巧


     Xshell是Windows平台下的一款ssh客户端程序,支持标签卡方式打开会话。打开多个会话后,打开"View"菜单,选中"Compose Bar",在Xshell底端会出现一个输入框,点击输入框旁边的按钮,选择"To All Sessions",就可以对所有打开的会话执行相同的操作了

    此办法的缺点的是在输入框里是没办法用命令tab补全的,还有用vim编辑的时候不方便。

    复制和粘贴

    由于在linux的Shell下,Ctrl+c是中断当前指令,这个快捷键和windows下的复制快捷键冲突,所以经常犯错误,想复制的时候按了ctrl+c,结果中断了当前指令。在Xshell中,提供了其它的快捷键来执行这些操作:

    复制:Ctrl+Insert

    粘贴:Shift+Insert

    粘贴还有一个键就是鼠标中键,另外你还可以设置点鼠标右键就是粘贴,设置选项在tool/options:

    xshell常用技巧搜集 - 白杨 - 白杨

    将当前Shell中的内容复制到“记事本”中

    有时候需要把shell中的一些内容临时复制到“记事本”中,如果再打开一个记事本,再复制粘贴。。。麻烦。XShell中内置了这一功能,使用很简单,就是选中内容,鼠标右键,选择"To Notepad”,再选中"Select Area”或者"All”或者"Screen”,如图:

    xshell常用技巧搜集 - 白杨 - 白杨

    快速选择当前行

    在shell界面下快速点三次鼠标就选中当前行了.

    快速打开Sessions对话框

    有时候打开XShell后希望能直接打开Sessions对话框,这时候只要在Shell界面输入open即可。

    迁移连接信息

    在XShel中,每个保存的Session连接信息都是保存到.xsh(就是ini文件,可以用文本编辑器打开)文件中的。它的默认路径是

    "%APPDATA%NetSarangXshellSessions”

    即:C:Users用户名AppDataRoamingNetSarangXshellSessions

    迁移连接信息直接拷贝这些xsh文件即可。

    最小化到系统托盘

    XShell默认最小化是不会到系统托盘的,但是有个选项可以修改,设置在:Tools→Options→Advanced→Minimize to system tray 打钩即可。

    退出时总是弹出烦人的确认对话框?

    选择在这:Tools→Options→Advanced→Confirm connection close when session exits

    还有一个:Tools→Options→Advanced→Confirm connection close when XShell exits

    在打开的Tab中快速切换

    快捷键:Alt+1~9 或者Ctrl+Tab 或者Shift+Tab

    设置:Tools→Options→Menu & Short Keys

    ----------------------------------------------------------------------------------

    Internal Commands:
    new:      Creates a new session.
    open:     Opens a session or the session dialog box.
    edit:     Opens the Session Property dialog box for a session.
    list:     Lists information of all available sessions. 'ls' and 'dir' do the same.
    cd:       Changes the current working directory.
    clear:    Clears the screen/address/command history.
    help:     Displays this help. '?' does the same.
    quit:     Quits Local Shell. 'exit' does the same.
    ssh:      Connects to a host using the SSH protocol.
    telnet:   Connects to a host using the TELNET protocol.
    rlogin:   Connects to a host using the RLOGIN protocol.
    sftp:     Connects to a host to transfer files securely.
    ftp:      Connects to a host to transfer files.

    External Commands:
    ipconfig: Configures TCP/IP network interfaces.
    ping:     Sends ICMP ECHO_REQUEST packets to network hosts.
    tracert:  Prints the route packets take to network host.
    netstat:  Displays current protocol statistics and current
              TCP/IP network connections.

    ---------------------------------------------------------------------------------

    xshell常用技巧搜集 - 白杨 - 白杨

    xshell常用技巧搜集 - 白杨 - 白杨

  • 相关阅读:
    opencast的docker安装
    编译openwrt_MT7688_hiwooya
    linux中mysql自动同步
    网站服务器迁移
    vtigercrm安装
    ixcache的蜜汁突发故障
    20180628
    pip3 install -r requirements.txt安装超时解决方法
    pytest文档29-allure-pytest
    pytest框架
  • 原文地址:https://www.cnblogs.com/duerbin/p/3431882.html
Copyright © 2020-2023  润新知