![比ping更强大的命令](https://i-blog.csdnimg.cn/blog_migrate/a9d51a21d539a562661dbdf437fbb02c.png)
比ping更强大的命令
![Running htop via ssh under ConEmu Running htop via ssh under ConEmu](https://i-blog.csdnimg.cn/blog_migrate/20b17549b2c59b01312712d85853ec3e.png)
I've blogged before, in fact in 2004, (!) that Windows is missing the text mode boat. There is a massive opportunity for a great, nay, awesome and pretty, command line on Windows. If someone cracks this problem, they're gonna be heroes.
实际上,我在2004年就写过博客(!) ,说Windows缺少文本模式boat 。 在Windows上有一个巨大的机会,可以提供一个很棒的,讨厌的,很棒的,漂亮的命令行。 如果有人破解了这个问题,他们将成为英雄。
I love iTerm2 and its tabs, its font handling, its simple elegance. I want this on Windows. In 2011 I found Console2, and then in 2012 I moved to ConEmu, a great tabbed terminal for Windows. Even then, it's not "pretty." I love these guys, and the ConEmu is truly an amazing and configurable piece of software, but it was written by developers for developers. I have to change the fonts to Consolas for the main font and Segoe UI for the rest to make it tolerable. Am I being petty and focusing on looks? Absolutely. Gorgeous and functional software is why Mac companies like Panic exist. They make things that are pretty AND functional. Windows folks could definitely "lovingly design" stuff more.
我喜欢iTerm2及其标签,字体处理,简单优雅。 我想要在Windows上。 2011年,我找到了Console2 ,然后在2012年,我搬到了ConEmu,这是Windows的出色选项卡式终端。 即使那样,它也不是“漂亮”的。 我喜欢这些人,ConEmu确实是一款了不起的可配置软件,但是它是由开发人员为开发人员编写的。 我必须将主要字体更改为Consolas,将其余字体更改为Segoe UI,以使其可容忍。 我是个小人物,专注于容貌吗? 绝对。 功能强大且功能强大的软件是Mac之类的Panic之所以存在的原因。 他们制作的东西既漂亮又实用。 Windows人士肯定可以更多地“热爱设计”。
Here's some command line utilities that augment and help - but don't yet complete save - the Windows Command Line.
以下是一些命令行实用程序,它们可以增强和帮助Windows命令行(但尚未完成保存) 。
碰杯 (Clink)
I just learned about Clink and I'm hooked. It's hooked as well, directly into your cmd.exe window! *rimshot*
我刚刚了解了Clink并迷上了。 它也直接挂在您的cmd.exe窗口中! * rimshot *
We all know that there's Cygwin for a bash-like experience in Windows, but Click is a small utility that brings some of those productivity and editing features into cmd.exe directly!
我们都知道Cygwin可以在Windows中提供类似bash的体验,但是Click是一个小型实用程序,可以将其中的某些生产力和编辑功能直接引入cmd.exe!
Bash-like line editing from GNU's Readline library. Read more on Readline's keyboard shortcuts.
来自GNU Readline库的Bash式行编辑。 在Readline的键盘快捷键上了解更多信息。
- Better path completion (TAB). 更好的路径完成(TAB)。
Paste from clipboard (Ctrl-V). Oh yes.
从剪贴板粘贴(Ctrl-V)。 哦,是的。
- Support for the completion of executables/commands, and environment variables. 支持完成可执行文件/命令和环境变量。
Undo/Redo (Ctrl-_ or Ctrl-X, Ctrl-U)
撤消/重做(按Ctrl - _或Ctrl-X键,Ctrl-U)
Improved command line history.
改进的命令行历史记录。
- Persists across sessions. 跨会话坚持。
- Searchable (Ctrl-R and Ctrl-S). 可搜索(Ctrl-R和Ctrl-S)。
History expansion (e.g. !!, ! , and !$).
历史扩展(例如!! , ! 和!$ )。
The most significant change that Clink makes is to Tab Completion, moving to a more Bash-y "show them the choices" mode rather than the DOS-like "make them cycle through everything." Here I've pressed TAB over 2013-0 and Clink is showing me what I can choose from.
Clink所做的最重要的改变是“ Tab Completion”(制表符完成),转向一种更为Bash-y的“向他们展示选择”模式,而不是像DOS一样的“使它们遍历一切”。 在这里,我在2013-0期间按下了TAB键,Clink向我展示了我可以选择的内容。
PowerShell ISE (PowerShell ISE)
Surprise! You already have this on your Windows computer. Ya, it freaked me out also. You can even hide the script pane if you want (Ctrl-R) and just use PowerShell ISE as a console! You get auto completion (see the Directory intellisense below), coloring, aliases and all the power of PowerShell.
惊喜! 您已经在Windows计算机上安装了它。 是的,它也吓坏了我。 如果需要,甚至可以隐藏脚本窗格(Ctrl-R),只需将PowerShell ISE用作控制台即可! 您将获得自动完成功能(请参阅下面的目录智能感知),颜色,别名和PowerShell的所有功能。
Sure, it's not bash, but that may be a good thing. You may not have been exposed to PowerShell and the prospect may frighten you, but try it for a bit. They've aliased the obvious commands "ls" does what you'd expect as does "dir." Moving around will feel like any command prompt.
当然,这不是bash,但这可能是一件好事。 您可能没有接触过PowerShell,前景可能使您感到恐惧,但请尝试一下。 他们已经为明显的命令“ ls”和“ dir”做了别名。 到处走动就像任何命令提示符一样。
Not to mention if you are using PowerShell you already get a full debugger experience.
如果你不使用PowerShell的你已经得到一个完整的调试经验就更不用说了。
It won't win any awards for good looks (again, I come back to the importance of fonts, whitespace, and good typography...get a designer) but it is extremely functional and you already have it!
它不会因外观好而获得任何奖项(再次,我回到字体,空白和良好的排版的重要性...找一位设计师),但是它功能非常强大,而且您已经拥有了!
E ()
![ConEmu让您将控制台放入JumpLists! ConEmu lets you put your consoles in JumpLists!](https://i-blog.csdnimg.cn/blog_migrate/08b458dd26648a54d275f692dfd93ba6.png)
I've talked about ConEmu before, but I'll bring some of that over here. ConEmu takes your command prompt and adds tabs, status bar details, admin tabs, freakin' taskbar progress bars on copies (which is hot), and deep support for FarManager (Norton Commander anyone?)
之前我已经讨论过ConEmu ,但是这里我将介绍其中的一些内容。 ConEmu会显示您的命令提示符,并在副本上添加选项卡,状态栏详细信息,管理选项卡,freakin'任务栏进度条(很热门) ,以及对FarManager的深入支持(Norton Commander有人吗?)
ConEmu is definitely a huge jump for console usability on Windows. The feature that really blew me away was Progress Bar integration. If you're familiar with Windows 7 you are likely familiar with the way that progress bars are overlaid over a Windows 7 Taskbar button. ConEmu looks at the current application running and some heuristics and overlays progress. Madness. Do a chkdsk and watch the progress bar. Love this little detail.
对于Windows上的控制台可用性, ConEmu无疑是一个巨大的飞跃。 真正让我惊讶的功能是Progress Bar集成。 如果您熟悉Windows 7,则可能会熟悉进度条在Windows 7任务栏按钮上的覆盖方式。 ConEmu会查看当前正在运行的应用程序以及一些启发式方法和覆盖进度。 疯狂。 进行chkdsk并查看进度栏。 喜欢这个小细节。
![ConEmu Progress Bar ConEmu Progress Bar](https://i-blog.csdnimg.cn/blog_migrate/215449a1a24729a95062e6b158cfdeee.png)
适用于Windows或Cygwin的Git (Git for Windows or Cygwin)
If you want a Linux-like experience on Windows with a nice shell, Cygwin has long been a choice. However, since the release of Git for Windows most folks I know just install it and use the Git Bash. If you get Cygwin proper you'll get a much more complete "fake Linux" through their very competent set of command line tools, but for most, Git Bash will suffice.
如果您想在Windows上使用精美的外壳在Linux上体验Linux,那么Cygwin一直是一个不错的选择。 但是,自从Windows版Git发行以来,我知道大多数人都只是安装它并使用Git Bash。 如果您正确使用Cygwin,则可以通过他们非常称职的命令行工具获得更完整的“伪Linux”,但是对于大多数人来说,Git Bash就足够了。
What about SSHing? That's a fundamental part of command-line life for folks connecting to remote Unix machines. For me, I have a Linux farm I run on Azure that I often need to ssh into.
SSHing呢? 对于那些连接到远程Unix机器的人们来说,这是命令行生活的基本组成部分。 对我来说,我有一个在Azure上运行的Linux服务器场,我经常需要将该服务器场转换到其中。
Random: I like to say I 'shoosh' into the machines, but folks keep looking at me weird. I thought this was a thing?
随机:我想说我“疯狂”到机器中,但是人们一直看着我很奇怪。 我以为这是事情吗?
However, the SSH clients for Windows suck. Ok, they don't suck, but they are ugly. It's scandalous how ugly. Mad respect to PuTTY for being awesome and super functional, but it's like running Windows 95 in a window every time I launch it. Here's some better SSH clients, including a fork of PuTTY itself.
但是,Windows的SSH客户端很烂。 好的,它们不吮吸,但是很丑。 多么丑陋可笑。 对PuTTY的出色表现和超级功能感到疯狂,但就像我每次启动Windows 95时都在一个窗口中运行。 这是一些更好的SSH客户端,包括PuTTY本身的分支。
Bitvise SSH客户端-更重要的是,从命令行使用SSH (Bitvise SSH Client - more importantly, SSH from the command line)
The Bitvise SSH Client is free for personal use and works great. There's a whole GUI, and, bless them, it's not pretty. However! There's also a command line version which is the REAL treasure. I just want to type ssh and be on my way.
Bitvise SSH客户端免费供个人使用,并且效果很好。 有一个完整的GUI,并且祝福他们,这并不漂亮。 然而! 还有一个命令行版本,这是真正的宝藏。 我只想输入ssh即可。
In fact, I made a batch file called "ssh.bat" and put it in my PATH that just has this inside: "stermc %1" this means I can just type ssh user@hostname:port and be on my way. This is, for me, WAY easier than putty for most things. Bitcise is definitely worth checking out.
实际上,我制作了一个名为“ ssh.bat”的批处理文件,并将其放在仅包含以下内容的PATH中:“ stermc%1”,这意味着我只需键入ssh user @ hostname:port即可。 对我来说,在大多数情况下,这比腻子要容易得多。 Bitcise绝对值得一试。
猫咪 (Kitty)
Kitty is a fork of version 0.62 of the original PuTTY. There's also a portable version that I've put in my Dropbox utils folder (which is in my PATH) so it's on every machine I have automatically. Kitty has some nice features like Send to Tray, transparency, session launching (so you don't need Pageant), and lots of little poweruser features like "rolling up" the app if you Ctrl-Click on the Title Bar.
Kitty是原始PuTTY版本0.62的叉子。 我在Dropbox的utils文件夹(位于PATH中)中也放置了一个便携式版本,因此它会自动存在于我拥有的每台计算机上。 Kitty具有一些不错的功能,例如发送到纸盘,透明性,会话启动(因此您不需要Pageant)以及许多高级用户功能,例如在按住Ctrl键的同时单击标题栏上的“滚动”应用程序。
Kitty also can integrate into your browser to handle ssh:// links, which is a nice touch.
Kitty还可以集成到您的浏览器中以处理ssh://链接,这很不错。
What console app improvers have I missed? What do you use on Windows? Sound off in the comments.
我错过了哪些控制台应用程序改进程序? 您在Windows上使用什么? 在评论中听起来不错。
Sponsor: Big thanks to the folks at RedGate for sponsoring the feed this week. Take a moment and check out their free download of Deployment Manager! Easy release management: Deploy your .NET apps, services and SQL Server databases in a single, repeatable process with Red Gate’s Deployment Manager. There’s a free Starter edition, so get started now!
赞助商:非常感谢RedGate的人们本周赞助了feed。 花点时间检查一下他们免费下载的Deployment Manager! 轻松的发布管理:使用Red Gate的Deployment Manager在一个可重复的过程中部署.NET应用程序,服务和SQL Server数据库。 有免费的简化版,请立即开始!
比ping更强大的命令