[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.

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.

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.

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.

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.

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.

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.

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.

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.



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终端 基础命令

时间: 2024-10-07 10:12:32

[Chrome_OS]Crosh Shell终端 基础命令的相关文章

ubuntu终端基础命令

1. 启动终端的快捷键: ctr + alt + t2. 终端字体放大: ctr+shift+'+'3. 终端字体放大: ctr+'-'4. ls : 查看当前目录的文件信息 4.1 ls 路径: 查看指定目录的信息 4.1. pwd: 查看目录所在的路径5. touch: 创建文件 5.1 touch 1.txt 2.txt 创建多个文件6. mkdir: 创建文件夹7. rmdir: 删除空文件夹8. rm: 默认删除的文件, 提示:删除文件夹需要加上-r选项, -r:以递归的方式把文件夹里

shell的基础命令

shell中截取字符串的方法有很多中, ${expression}一共有9种使用方法. ${parameter:-word} ${parameter:=word} ${parameter:?word} ${parameter:+word} 上面4种可以用来进行缺省值的替换. ${#parameter} 上面这种可以获得字符串的长度. ${parameter%word} 最小限度从后面截取word ${parameter%%word} 最大限度从后面截取word ${parameter#word}

shell脚本基础命令学习(一)

shell的作用是解析用户的指令,将shell指令按照特定的流程,组合形成脚本. 查看当前系统shell版本: 编写一个简单的shell脚本后,可以使用下面几种方法来执行: 1,使用chmod给脚本增加x权限,如:chmod +x test.sh 2,/bin/sh 或者 /bin/bash 执行脚本(会创建子进程) 3,source ./test.sh 脚本执行 4,小括号方式,会创建子进程 环境变量,可以直接设置,例如var=100,使用unset var可以删除 通配符: * 匹配一个或多

mac shell终端编辑命令行快捷键——行首,行尾

Ctrl + d        删除一个字符,相当于通常的Delete键(命令行若无所有字符,则相当于exit:处理多行标准输入时也表示eof) Ctrl + h        退格删除一个字符,相当于通常的Backspace键 Ctrl + u        删除光标之前到行首的字符 Ctrl + k        删除光标之前到行尾的字符 Ctrl + c        取消当前行输入的命令,相当于Ctrl + Break Ctrl + a        光标移动到行首(Ahead of l

mac shell终端编辑命令行快捷键

ctrl+a //移到行首 ctrl+e //移到行尾===========linux系统用============alt+a //移到光标所在单词首部alt+e //移到光标所在单词尾部 alt+d //删除光标处到单词尾部 ctrl+y // 插入最近删除的单词或语句ctrl+k //删除光标处到行尾部分ctrl+u //删除光标处到行首部分ctrl+w //删除光标处到当前单词开头部分或语句 原文地址:https://www.cnblogs.com/68xi/p/9328253.html

Mac上的终端bash命令 Bourne-Again Shell简介

mac上的终端使用的是Bourne-Again Shell命令,简称bash Bourne-Again Shell简介 一 bash是GNU组织开发和推广的一个项目,是对Bourne shell的扩展 Bourne shell是 UNIX 最初使用的 Shell,作者Steven Bourne bash是许多Linux平台的内定Shell,传统UNIX上还有许多Shell,包括tcsh.csh.ash.bsh.ksh Shell Script大致都类同,一个Shell Script通常可以在很多

续写vim,shell脚本基础编辑,read命令,if与case判断语句,文件查找方式,压缩与解压,

一. Vim续写 ?1.命令扩展模式的位置定界 ??起始位置 cmd 终止位置???Cmd:????y复制????d删除????Gu变大写????gu变小写??例如:0y$命令意味着:????0 先到行头????Y 从这里开始拷贝????$ 拷贝到本行行尾最后一个字符????Ye 从当前位置拷贝到本单词的最后一个字符 ?2.扩展命令模式:地址定界 ? ?# 具体第#行,? ?#1,#2 从开头数第#1行到第#2行? ?#1,+#2 从开头数的第#1行到从第#1行开始数的第#2行? ? ?例:2,

Linux CentOS 7 Shell基础(命令历史,管道,作业控制,变量及环境变量)

一. shell介绍 shell是一个命令解释器,提供用户和机器的交互. 支持特定语法,比如逻辑判断,循环. 每个用户都有特定的shell centos7默认shell 为bash(Bourne Agin Shell) 还用zsh,csh,ksh等 二. 命令历史history history 命令历史 history -c 清空内存缓存命令. ~/.bash_history 命令历史的存储文件 HISTSIZE=1000 默认命令历史记录1000条 /etc/profile-----HISTO

Linux安全基础:shell及一些基础命令

1.什么是shell?Shell是用户和Linux操作系统之间的接口.Linux中有多种shell,其中缺省使用的是Bash. 2.shell的分类(1)bash bash shell 是 Bourne shell 的一个免费版本,它是最早的 Unix shell,包括许多附加的特点.Bash 有可编辑的命令行,可以回查历史命令,支持 tab 键补齐以使用户避免输入长的文件名.(2)csh C shell 使用的是“类C”语法,借鉴了 Bourne shell 的许多特点,只是内部 shell