十三年专注于网站建设与互联网应用开发,低调、有情怀的网络应用服务商!
南昌百恒科技微信公众号 扫一扫关注
tel-icon全国服务热线:400-680-9298,0791-88117053
扫一扫关注百恒科技微信公众号

如何检查并安装emacs编辑器?

百恒 2017-09-07 15:17:13 3221
       emacs编辑器是一款极其流行的编辑器,甚至比Unix出现的都早。开发人员对它爱不释手, 于是就将其移植到了Unix环境中,现在也移植到了Linux环境中。跟vi很像,emacs编辑器一开始也是作为控制台编辑器,但如今已经迁移到了图形化世界。 

       很多发行版默认并没有安装emacs。可以使用which和/或yum list命令检查一下自己所用的基于Red Hat的发行版,下面江西网络公司-百恒网络就来为大家介绍一下其操作方法:
       $ which emacs 
       /usr/bin/which: no emacs in (/usr/lib64/qt-3.3 
       /bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin: 
       /usr/sbin:/sbin:/home/Christine/bin) 
       $ 
       $ yum list emacs 
       [...] 
       Available Packages
       emacs.x86_64         1:23.1-25.el6            base 

       emacs编辑器软件包目前并没有安装在CentOS发行版中。不过,还是可以把它安装上的。 

       对于基于Debian的发行版,可以使用which和/或apt-cache show命令来检查emacs编辑器软件包的安装情况,在Ubuntu发行版中的演示如下。

       $ which emacs 
       $ 
       $ sudo apt-cache show emacs 
       Package: emacs 
       Priority: optional 
       Section: editors 
       Installed-Size: 25 
       [...] 
       Description-en: GNU Emacs editor (metapackage)  
       GNU Emacs is the extensible self-documenting text editor.  
       This is a metapackage that will always depend on the latest  
       recommended Emacs release. 
       Description-md5: 21fb7da111336097a2378959f6d6e6a8 
       Bugs: https://bugs.launchpad.net/ubuntu/+filebug 
       Origin: Ubuntu 
       Supported: 5y 
       $ 

       which命令的执行方式在这里有点不一样。当它没有找到已安装的命令时,直接返回的就是 bash shell提示符。在演示所用的Ubuntu发行版中,emacs编辑器软件包是选装的,但也可以进行安装。下面显示了在Ubuntu上安装emacs编辑器。 

       $ sudo apt-get install emacs

       Reading package lists... Done 
       Building dependency tree 
       Reading state information... Done 
       The following extra packages will be installed: 
       [...] 
       Install emacsen-common for emacs24 
       emacsen-common: Handling install of emacsen flavor emacs24 
       Wrote /etc/emacs24/site-start.d/00debian-vars.elc 
       Wrote /usr/share/emacs24/site-lisp/debian-startup.elc 
       Setting up emacs (45.0ubuntu1) ... 
       Processing triggers for libc-bin (2.19-0ubuntu6) ... 
       $ 
       $ which emacs 
       /usr/bin/emacs 
       $

       现在再使用which命令的话,它就会显示出emacs程序的位置。这说明该Ubuntu发行版已经 可以使用emacs编辑器了。 

       就CentOS发行版而言,可以使用yum安装命令来安装emacs编辑器。 

       $ sudo yum install emacs 
       [sudo] password for Christine: 
       [...] 
       Setting up Install Process 
       Resolving Dependencies 
       [...] 
       Installed:   
       emacs.x86_64 1:23.1-25.el6 
 
       Dependency Installed:   
       emacs-common.x86_64 1:23.1-25.el6   
       libotf.x86_64 0:0.9.9-3.1.el6   
       m17n-db-datafiles.noarch 0:1.5.5-1.1.el6  

       Complete! 
       $ 
       $ which emacs 
       /usr/bin/emacs 
       $ 
       $ yum list emacs 
       [...] 
       Installed Packages 
       emacs.x86_64               
       1:23.1-25.el6               
       @base 
       $

       以上就是江西网络公司-百恒网络为大家介绍的关于对emacs编辑器的检查及安装方法,将emacs编辑器成功安装到你的Linux发行版之后,就可以开始学习它的各种功能了。至于如何使用emacs编辑器,本公司后面会为大家介绍,由于时间关系,今天就不多说明了,如感兴趣的朋友,欢迎关注百恒网络网站!
400-680-9298,0791-88117053
扫一扫关注百恒网络微信公众号

欢迎您的光顾,我们将竭诚为您服务×

售前咨询 售前咨询
 
售前咨询 售前咨询
 
售前咨询 售前咨询
 
售前咨询 售前咨询
 
售前咨询 售前咨询
 
售后服务 售后服务
 
备案专线 备案专线
 
售后服务 售后服务
 
×