新手必知:Python程序员为什么一定要掌握Linux?

不少Python新手经常问到 学Python到底需不需要学习Linux? Python不是支持Windows和Linux操作系统吗?能在Windows下开发为什么还要学习Linux?

问这样的问题的朋友,可能还没有真正入行Python开发或者没有真正参与公司的一些项目部署,上线过程,对于上面问题,首选答案是肯定的, Python开发可以在Windows下开发,但是Linux学习仍然是必须的。

线上服务器一般是Linux

一般在生产环境中,服务器基本都是Linux的,比如centos,红帽,ubuntu等linux系统,为什么服务器用linxu居多?

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1557994050493″ data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《新手必知:Python程序员为什么一定要掌握Linux?》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

Python学习交流群:1004391443,这里有资源共享,技术解答,还有小编从最基础的Python资料到项目实战的学习资料都有整理,希望能帮助你更了解python,学习python。

比如其中一点肯定是安全啊,我们听过Windows经常死机,被勒索病毒入侵要支付比特币,但是这些在Linux下却不经常发生,其他也有很多原因可以网上查找,所以 生产环境的Python脚本都是在linux系统上部署的;

但是开发的话,考虑到操作的方便,Windows或者Mac下不仅仅有图形界面,而且性能也会好些,操作起来比较容易,快捷,毕竟使用过乌班图的都知道,装虚拟机还是对电脑性能有一定要求的,电脑配置跟不上的话,用乌班图也会很卡顿,而一般服务器级别的系统都是字符型界面,就是咱们传说中的黑屏,如果你想在linux服务器上开发也是可以的,只不过比较麻烦,对代码水平和操作熟练度要求很高。

部署

线上部署经常会遇到部署到服务器上后调试代码的问题,一般在调试过程中,开发人员会经常性的来回切换目录,查找文件,用VI来修改代码, 这些常规的操作,都是一名python开发工程师的必备技能;

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1557994050500″ data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《新手必知:Python程序员为什么一定要掌握Linux?》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

vi运用也是各种Linux命令,这样会方便直接,不用将代码传到线下,修改完再传到服务器,那些搞黑客都是直接在Linux下命令来操作的,因为他们要攻击修改对方服务器代码数据,必须要懂这Linux下的所有操作,而且对于黑客来说,用命令比图形界面更高效

Linux更方便

Linux相对于开发者而言更加方便,Linux系统你是拥有着最高权限的,里面的各种配置,工具都任由你来选择,但是Windows下,你能对系统做的修改就相对麻烦些。

使用Linux,各种配置文件的修改也就是几个命令的事,工具的安装也就几个命令,Windows下面如果修改配置,你可能需要到处去寻找这个文件,这也是图形界面的缺点。

总结一下 ,Python语言也可以在Windows下学习和开发,但是在Linux系统下更加方便些。

<tt-image data-tteditor-tag=”tteditorTag” contenteditable=”false” class=”syl1557994050504″ data-render-status=”finished” data-syl-blot=”image” style=”box-sizing: border-box; cursor: text; color: rgb(34, 34, 34); font-family: “PingFang SC”, “Hiragino Sans GB”, “Microsoft YaHei”, “WenQuanYi Micro Hei”, “Helvetica Neue”, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;”>
《新手必知:Python程序员为什么一定要掌握Linux?》 image

<input class=”pgc-img-caption-ipt” placeholder=”图片描述(最多50字)” value=”” style=”box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;”></tt-image>

比如,如 果是想用Python开发网站 (现今流行的、成熟的Python Web框架) 那就需要使用到Linux平台了 ,毕竟搭建这样的网站Linux平台更常用;

第二如果想使用Python爬虫爬取数据,在Linux系统上也要更方便一些; 还有就是想学习网络安全渗透测试,在Linux上编写Python自动化测试脚本也很有必要。

    原文作者:不谈风月_0eb8
    原文地址: https://www.jianshu.com/p/0f6c58e66d0c
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞