[Chrome_OS]Crosh Shell终端 基础命令

摘要:
谷歌的ChromeOS包括一个名为ChromeShell的外壳环境,简称“crosh”。Croshin包括几个终端命令,即使开发人员模式不可用,也可以使用所有的ChromeBook

chrome-os-crosh-shell

Google’s Chrome OS includes a shell environment known as Chrome Shell, or “crosh” for short. Crosh includes several terminal commands that can be used on all Chromebooks, even ifdeveloper mode isn’t enabled.

Crosh includes commands for connecting to SSH servers, monitoring resource usage, debugging network problems, tweaking hidden hardware settings, performing hardware tests, and other debugging purposes.

Opening Crosh

To open the Crosh, press Ctrl+Alt+T anywhere in Chrome OS. The Crosh shell will open in a browser tab.

From here, you can run the help command to view a list of basic commands or run thehelp_advanced command for a list of “more advanced commands, mainly used for debugging.” We’ll cover some of the most interesting ones below.

ssh

Google provides an SSH client in the Chrome Web Store, but you don’t need to use it. You can use the built-in ssh command to connect to SSH servers without installing anything else on your Chromebook.

The ssh command is more advanced than you might expect. In addition to simply connecting to an SSH server, you can also use SSH tunneling to create a local proxy that allows you to tunnel your Chrome OS network activity over your SSH connection. You can also add private keys that you may need to connect to SSH servers.

chromebook-ssh-client

ssh_forget_host

The ssh_forget_host command displays a list of known hosts you’ve connected to with the SSH command and allows you to “forget” a host. The next time you connect to the host, you’ll be asked to verify its key fingerprint again.

top

Chrome includes its own task manager that shows you which Chrome tabs, extensions, and plug-ins are using resources. However, Crosh also includes the top command from Linux, which gives you a display of all the low-level processes that may also be using resources. Most users will prefer using Chrome’s built-in task manager, but the top utility does provide more information. It also displays some information you can’t find elsewhere in Chrome OS, such as your Chromebook’s uptime.

chromebook-top-command

ping

Yes, Chrome OS also has a ping command. Ping is an important utility for network troubleshooting, allowing you to see how long packets take to travel between your system and a web server and see whether any packets are being dropped. It works just like the ping command on other operating systems. Press Ctrl+C to stop the ping process or halt any other command in Crosh.

chromebook-ping-command

tracepath

The tracepath command functions similarly to traceroute, allowing you to trace the path packets take to reach a remote server. It’s another useful network-troubleshooting command, as it allows you to determine exactly where network problems are occurring between you and another networked device.

tracepath-chrome-os

network_diag

The network_diag command performs a short set of network diagnostic tests, saving the output as a .txt file you can view in your Chromebook’s Files app.

chrome-os-network_diag

sound

Chrome includes a command that can record audio from your Chromebook’s microphone and play it back later.

To record 10 seconds of audio from your Chromebook’s microphone, run the following command:

sound record 10

The audio will be saved as a file you can access from your Chromebook’s Files app. You can then play it back with the sound play command.

chromebook-record-sound-file

tpcontrol

The tpcontrol command allows you to fine-tune your device’s touchpad. Some of these options are available in Chrome OS’ settings window, but you can tweak many properties that aren’t available from the graphical interface.

chromebook-tpcontrol

xset m

The xset m command allows you to tweak your mouse acceleration rate. Chrome OS only has options for controlling the mouse’s speed in its graphical interface, so any fine-tuning of the acceleration rate — particularly useful if you’re using an external mouse that doesn’t work well with the default rate — must be done from here. The acceleration rate is configured in the same way you’d use the xset m command to configure acceleration rates on a standard Linux system.

xset r

The xset r command allows you to tweak the autorepeat behavior for when you hold a keyboard button down. You can select a delay before autorepeat starts and configure how many repeats occur per second. You can also disable autorepeat completely for every key on the keyboard or just disable autorepeat for specific keys.

chrome-os-xset

Developer Mode Commands

In developer mode, you also have the following commands available to you:

  • shell: Opens a full bash shell where you can run other Linux commands, including ones that can launch standard Linux desktop environments after you install them.
  • systrace: Start system tracing, allowing you to capture logs for debugging purposes.
  • packet_capture: Start capturing and logging packets.

chrome-os-developer-mode-shell


You’ll find other commands if you run the help_advanced command — everything from memory tests and a Bluetooth debugging console to commands that let you control the debugging level for different background services. Many of these options are only useful for Chrome developers.

免责声明:文章转载自《[Chrome_OS]Crosh Shell终端 基础命令》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇python学习-[小甲鱼]零基础入门教学禁用SQL Server的SSRS日志追踪-防止Windows 磁盘被占满下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

OpenCV —— 写入AVI视频文件

打开视频文件,对每一帧进行极坐标变换,然后将转换生成的图像序列写入视频文件中 #include "cv.h" #include "highgui.h" int main(int argc,char** argv) { CvCapture* capture=0; capture = cvCreateFileCapture("video.av...

smarty小技巧之6个标签

1,capture标签 capture的中文意思是抓取,它的作用是抓取模板输出的数据,当我们需要它的时候,调用它,以得到抓取数据的目的。例子: {capture name=test} <img src=”testimg.jpg”> {/capture} <div class=”image”> {$smarty.capture.t...

H5调用手机的相机/摄像/录音等功能 _input:file的capture属性说明

H5使用input标签调用系统默许相机,摄像,录音功能。使用input:file标签, 去调用系统默认相机,摄像,录音功能,其实是有个capture属性,直接说明需要调用什么功能: <input type="file" accept="image/*" capture="camera"> <input type="file" accept...

实践windows下 speex 1.2rc1 中的回声消除功能(转)

看到网上很多希望使用speex aec的, 似乎找不到win32下的例子, 我这里尝试做了一个, 效果还行, 使用 上面是三路实时音频录下后, 在audacity中显示, 第一路为本地mic采集, 第二路为本地回放, 第三路为经过speex_echo_cancellation() 处理后的, 这个测试中, 为间断的读"1, 2, 3...", 图中选中的是...

addEventListener的第三个参数详解

示例代码 element.addEventListener("mousedown",func,{passive:true}); element.addEventListener("mousedown",func,{passive:true}); element.addEventListener("mousedown",func,{capture:false...

运行Capture.exe找不到cdn_sfl401as.dll

     今天运行capture Orcad16.6显示缺少cdn_sfl401as.dll,昨天运行时并没有发现这种情况,回想今天安装了modelsim之后才发生这种情况,于是将modelsim卸载掉,再次启动,依然出现警告提示。     因为警告的是找不到动态链接库dll,先猜想是否是dll文件被杀软误删,结果没有被删除,那么一定是系统的环境变量出了问...