在Ubuntu上将gFTP设置为默认命令行FTP客户端

时间:2020-01-09 10:45:25  来源:igfitidea点击:

gFTP是Ubuntu Linux的出色ftp客户端,既提供基于GUI的体验,又提供命令行客户端。有一种简单的方法可以在使用默认ftp客户端和使用gftp-text之间进行切换。首先,我们需要确保已安装gFTP。

我们将使用update-alternatives命令更改设置。打开一个终端窗口,然后输入以下命令:

sudo update-alternatives config ftp

我们应该看到类似于以下内容:

~$ sudo update-alternatives config ftp 
There are 2 alternatives which provide `ftp'. 
Selection Alternative
———————————————
*+ 1 /usr/bin/netkit-ftp
    2 /usr/bin/gftp-text 
Press enter to keep the default[*], or type selection number: 2

对于我的系统,gftp是选项2,因此我键入该文件并按Enter键。

要进行测试,只需键入ftp localhost,我们应该看到系统现在正在使用gftp。

~$ ftp localhost
gFTP 2.0.18, Copyright (C) 1998-2003 Brian Masney <[email protected]>. If you have any questions, comments, or suggestions about this program,
please feel free to email them to me. You can always find out the latest news
about gFTP from my website at http://www.gftp.org/
gFTP comes with ABSOLUTELY NO WARRANTY; for details, see the COPYING file. This
is free software, and you are welcome to redistribute it under certain
conditions; for details, see the COPYING file 
Username [anonymous]: