foxmail 无法启动,提示 FoxmailUpdateHook 运行后,卡后台
前几天手欠升了级 今天重启后,就再也打不开了
重装也不行
有遇到同样问题的不
前几天手欠升了级 今天重启后,就再也打不开了
重装也不行
有遇到同样问题的不
3 月 20 日,华为在深圳召开了华为 Pura 先锋盛典及鸿蒙智行新品发布会。这是今年华为的第一场大型发布会,现场公布了 HarmonyOS 5 的全新升级计划:2025 年 3 月底,HUAWEI nova 13 和 12 系列将开启 HarmonyOS 5 公测;HUAWEI MatePad Pro 13.2 和 12.2 英寸等多款机型将开启花粉 Beta。
系统升级迭代也在稳步推进:到 2025 年第二季度,华为还将开启多款已问世机型的 HarmonyOS 5.0.1 推送升级计划,包括 HUAWEI Mate 70 和 60 系列、Mate X6 系列,以及 MatePad Pro 13.2 英寸系列等。
而为了感谢用户的支持,升级鸿蒙操作系统 5(以下简称鸿蒙5)的用户还将获得迄今为止最高额的鸿蒙升级权益礼包,包括并不限于 QQ音乐、B 站、芒果TV、WPS、京东、天际通、酷狗等,以及一系列华为自有服务的高级会员功能,总计价值超过 1200 元。
自去年 10 月 8 日鸿蒙5开启公测以来,鸿蒙系统生态渐入佳境。而在今天的发布会现场我们看到,经过 5 个月的发展,鸿蒙操作系统不断迭代,生态趋向稳健。
截至 2025 年 3 月,鸿蒙已收获用户反馈的优化建议 400 多万条,完成系统更新迭代 30 多个版本,新增超过 150 项功能特性。目前,已有 2 万多个鸿蒙应用及元服务上架,微信、抖音、支付宝等 20 多个 APP 下载量超过 200 万次。
在 2025 年的开头,鸿蒙5作为一个新颖、完善的社区生态,商住两相宜。
从用户角度,一个应用短缺、用户匮乏的操作系统,不足以谓之生态。而鸿蒙系统目前超过 2 万个鸿蒙应用和元服务,虽然部分应用暂未更新所有功能,但也满足了日常的需求。更何况在如此短时间的情况下加速开发,本身已算是一项壮举。而今天各大生态伙伴在会上的站台支持,也给到了消费者足够信心,告诉大家:鸿蒙离成熟,不远了。
从合作伙伴角度,十亿级鸿蒙生态设备的保有量,加上大量的开发资源扶持,让企业和开发者不仅看到了鸿蒙生态的商业价值,更能真正从生态中分一杯羹。
经过艰难的系统搭建和生态维系实践,鸿蒙操作系统也算得上是自 Windows、Android 和 iOS 以来,硕果仅存的国产自主操作系统之一。
与此同时,在本次发布会上,华为还发布了首款全面搭载鸿蒙5的移动设备华为Pura X,而鸿蒙电脑也预告将于 5 月亮相。
至此,鸿蒙系统的软硬件合一,迎来全新的发展时代。
数码爱好者流传着一句话:想体验最原汁原味的 Android,一定要用谷歌 Pixel。
同理,想体验最极致的鸿蒙5,可以从首款鸿蒙5手机华为Pura X 入手。
作为一款折叠屏设备,华为 Pura X 前所未有地采用了 16:10 阔型屏的展开形态。这种更宽阔的显示比例,比常规直板机长形屏更适合阅读、游戏、浏览网页和观看视频。内屏和 1:1 比例的外屏均支持 120Hz 高刷/自适应刷新率、HDR Vivid 高动态显示。背后采用 4 摄模组,全面覆盖各种焦段。
在华为 Pura X 上,AI 功能以及语音智能助手小艺的智能体验获得了全方位的升级。在融合盘古和 DeepSeek 双大模型之后,小艺能够精准洞悉用户的需求,处理复杂的事务,比如帮接电话、智能缓存、时光机等,带来更懂用户的交互体验。
鸿蒙系统发布后,展现出系统交互的流畅度、丰富的个性化体验,以及对用户隐私的极致保护,备受广大消费者的青睐。
鸿蒙系统构建了一套属于自己的美学设计,并持续对其优化,呈现感官上一致的逻辑感;安全性方面,鸿蒙5也延续了并进一步加强了前代系统对数据安全的重视,提供单次、限时、指定数据授权等多种权限管理方式,并且让用户在使用过程中就能轻松调整;在多端互联全场景体验方面,鸿蒙系统则是为数不多真正在实践「响应式布局」的操作系统,在不同屏幕尺寸形态之间,实现用户界面和内容如「水」一般的自然流动。
作为鸿蒙5正式身份问世的旗舰设备,华为 Pura X 也是鸿蒙生态发展到今天的必然产物和里程碑事件。一个正式的操作系统,当然要配上专门为它打造的优秀设备。
事实上,从鸿蒙智慧屏、鸿蒙手机和可穿戴,到鸿蒙平板和电脑以及更多设备,华为一直致力于构建一个以用户体验为中心,实现全场景互联的生态体验。
而现场也提前预告了首台鸿蒙电脑,将于今年 5 月正式问世。
鸿蒙自初始就是按照一核多端的理念在推进,而现在传闻终于变成现实。以鸿蒙电脑为载体,鸿蒙系统将会成为第一个广大用户能够用上的,第一个国产自主且广泛可用的电脑操作系统。
作为又一个新物种,鸿蒙电脑也将为华为终端设备全面「鸿蒙化」起到强有力的助推作用。它将补齐鸿蒙版图里的关键一块,让鸿蒙系统可以作为一个自主的操作系统,真正首次在全球操作系统的重量级赛场上站稳脚跟。
鸿蒙的进步速度,令人有种时光飞逝的错觉。尽管它作为操作系统也才问世十多年,加速国产自主化也只是最近五六年的事情。
2019 年 8 月,华为正式发布鸿蒙系统,以智慧屏作为试水的载体,并且提出了鸿蒙生态的明确构思:
一个分布式操作系统,以手机为核心,并且用户无论在任何设备上都能够得到一致、流畅、个性化、兼容性强、为当前设备优化的体验。
再到 2.0 版本,「超级终端」终于将手机、手表等核心设备连接到一起;3.0 版本时,显示器、打印机、墨水屏、可穿戴、智能座舱等多种终端支持;4.0 版本则在硬件全覆盖之后,兑现软硬件协同,操作体验统一和流畅的承诺。
最终,到了鸿蒙5,鸿蒙操作系统进行了底层重构,将鸿蒙内核、方舟引擎和端云协同能力进行结合,真正的实现了质的变革,成为了能够让用户获得全新体验的「第三极」。
两年前,华为常务董事、终端BG董事长、智能汽车解决方案BU董事长余承东曾在华为开发者大会上做过一句表达:
轻舟已过万重山。
虽然给人一种云淡风轻的观感。但当时还未正式对外揭晓的鸿蒙操作系统,属实只是一叶轻舟,格外孤独。两岸猿啼,观望者众。
2024 年初,首批 200+ 应用的开发意向确认,其中不乏新浪微博、B站、小红书等核心应用;到了同年的华为开发者大会,已有 5000+ 应用启动开发,AppGallery 上可下载使用的主流应用数量超过了 1500 个。
作为一个自主操作系统,鸿蒙的应用和服务数量的增速不低,但其生态可持续性一直受到外界更加严格的审视。这也是鸿蒙系统在相当长一段时间里的缩影:应用少、功能缺失、生态不足。而这种劣势,在中国这种超级应用型的移动互联网市场,可能更加严重。
道理很简单,有短板就要补。
鸿蒙和生态伙伴们继续脚踏实地共同努力,事情也终于朝着有利方向发展。在鸿蒙团队的开发协助和资源倾斜帮助下,从老牌巨头到新创公司,从互联网大厂、中小型企业到各地的有关部门和事业单位,纷纷加速开发鸿蒙应用并提交到应用商城。
今天,微信、支付宝、抖音等「超级应用」在鸿蒙5上都达到了高度可用,使用体验接近用户更熟悉的 iOS 和 Android 版本,甚至已经配合鸿蒙操作系统实现了部分特性功能的创新,比如小红书在华为Pura X,以及华为折叠屏和大屏设备上的「横屏大视野,左图右评论」UI等。
底层方舟引擎的加持,大模型能力的快速应用,加上完善的应用生态,使得鸿蒙5的使用体验和 AI 交互能力追平甚至部分赶超基于 Android / iOS 的主流体验。
回顾来路,道阻且长,虽然发展的节奏很快,但生态伙伴和鸿蒙系统的双向奔赴,不但在很大程度上补齐了应用生态的完整性,也做出了很多不一样的功能。
结合鸿蒙系统的发展经历,以及 Windows Mobile 和 Tizen 操作系统无疾而终的故事,我们能够更清楚地看到操作系统成功的源本:
平地难以起高楼,一家公司自己的技术积累有多深、使命感有多强,并不是唯一,甚至不是最关键的决定因素;能否培养出健全的软件生态,并且和生态里的开发者、用户、合作伙伴奔着同一个目标齐头并进,才是一个操作系统成功的不二法门。
也正因此,在发布会上,余承东也对鸿蒙生态的合作伙伴们表达了感谢,并专门邀请了小红书、钉钉、WPS、B 站等多个关键伙伴上台展示他们的应用在鸿蒙系统上的优异体验。
移动互联网发展十余年,行业的先行者们已经创造了新的工作范式,培养了数以千万计的应用和服务开发者。而鸿蒙5也一定程度上享受到了作为操作系统「后来者」的红利。
过去一年多,我们看到已经有许多互联网大厂开高薪招聘鸿蒙开发工程师,也有不少深耕鸿蒙生态的独立开发者,赚到了第一桶金。
鸿蒙生态从来不是华为的独角戏,而是一场多方参与的大合唱。
几个月前 HarmonyOS NEXT 刚开始公测的时候,爱范儿做了一个投票来了解华为手机用户的升级意愿,样本量数千人。在当时,只有 21% 的受访者不打算升级,和已经尝鲜的公测用户比例相当。
观望中但有兴趣的用户占到一半,而很多观望者告诉我们,只要微信好用了就立刻升级。目前,大部分国民应用不仅支持鸿蒙,而且有了重新设计产品的机会,剔除了几年也用不到冗余功能,还没有广告。之前,爱范儿的文章下面就有读者留言:
赶快升级鸿蒙吧,在上面你能用到未来十年里最轻量的微信 / 微博 / 淘宝……
那么,去享受首个真正、自主、生态完整的国产操作系统,这个时刻已经离我们很近了。
当然,鸿蒙5目前仍有不足,一些小众应用的适配仍需时日,且由于系统稳定性和试用体验需要更多的完善工作,目前仍需要分批升级。对于老设备来说,获得升级资格可能也还需要多等一段时间。
不过,相信这一切仍值得等待。如果非要拔高一下格局,那么现在升级鸿蒙5,不仅能够成为当下最具创新精神的用户,更是对真正国产自主操作系统的一次「用脚投票」。无论支持与否,鸿蒙5都值得你去感受一下。
感受会逐渐变成享受的。
#欢迎关注爱范儿官方微信公众号:爱范儿(微信号:ifanr),更多精彩内容第一时间为您奉上。
如果说经济结构长期失衡是经济的“高血压糖尿病”,那么系统性金融危机就等于是经济的“脑梗”、“心梗”。
系统性金融危机,是指金融系统的整体性失衡,引发极其严重的经济问题。这种危机一般开始于银行、股市或者一些金融机构的崩溃,进而快速蔓延到整个经济体系之中。
系统性金融风险的爆发,常常是不可控的,等到发作的时候再采取措施,通常都会比较难办。
在房地产等资产泡沫严重的情况下,系统性金融风险就会如影随形。如果再叠加经济结构扭曲、经济信心不足、债务问题严重、金融体系脆弱、汇率大幅波动,系统性金融危机就有可能在某个临界点突然爆发。
那么,系统性金融危机会有哪些表现呢?
系统性金融危机的第一个标志,就是主要金融机构——通常是银行的倒闭。
2008年的金融危机就是一个例子。美国雷曼兄弟银行突然倒闭,拉开了这场危机的序幕。
当时,雷曼兄弟持有大量次级抵押贷款相关资产,也就是杠杆之上的杠杆,在流动性枯竭也就是资金断流之后,无奈只能宣布破产。
事件传出,立刻引发了全球范围内的金融市场恐慌,连带许多其他金融机构也陷入了困境。
1997年到98年的亚洲金融危机,危机起源地泰国的金融体系,就遭受了沉重打击。
在危机爆发前,汇商银行其实就已经因为腐败等问题滋生了大量的不良贷款,在危机初期,这家银行就倒闭了,从而引发了连锁反应。
除了银行,泰国还有56家金融公司在危机中倒闭。这些公司的脆弱根源又在于房地产——它们普遍存在过度借贷,然后投资于房地产,导致资产泡沫严重、公司流动性脆弱。
那次危机严重到,泰国最大的银行如泰京银行,都面临着严重的流动性危机。如果不是政府进行注资和接管,这样的大型银行倒闭后果不可想象。
系统性金融危机,往往伴随着股市的暴跌,以及各种资产价格的迅速崩溃。
因为市场的基础是人性,当人们普遍陷入恐慌,踩踏式的抛售就会发生,股市就会发生泥沙俱下式的暴跌。其他一些资产尤其是带有杠杆性质的资产,也会随之暴跌。
2008年金融危机,全球股市就遭受了空前的重创。美国道琼斯工业平均指数在几个月内暴跌达50%,同时连带全球股市均出现大幅度的下跌。
作为有泡沫的资产,房地产市场也会受到重创。房价通常会在系统性金融危机之下出现巨幅下跌,会有大量的家庭陷入负债状态。
系统性金融危机是一个恶性循环,房价的大跌会进一步刺激金融系统的脆弱性,让其雪上加霜。
系统性金融危机下,银行挤兑是最为恐怖的场景之一,一旦出现,将会是毁灭性的。因为银行挤兑所带来的恐惧传染非常严重,很容易就走向全面的金融失控。
银行挤兑,是因为存款人对银行的偿付能力失去信心,大家一起去银行要求提取存款。
银行挤兑可怕之处在于,会直接导致银行的流动性枯竭。因为银行在日常业务中一般只保留小部分的现金,绝大部分存款,都被用于贷款或者其他的投资方式。
当危机爆发,大量的存款人同时涌向银行,要求立刻提取现金,银行必须兑现信用,但为数不多的现金会很快耗尽,无法满足众人的提款要求。
这时候,如何让存款人重回信任是最难的,有时候尽管政府会出面,但可能会“越描越黑”,加剧“不信任螺旋”。
银行挤兑不仅影响某一个银行,它会迅速扩散到整个银行体系。
这时候,全面的信任危机就爆发了。多米诺骨牌效应形成,金融系统可能会走向快速的崩溃。
系统性金融危机发生后,政府通常必须采取干预措施以稳定市场信心。
救市措施一般包括向银行注资、货币宽松政策、增加公共支出等。
因此可能也有人会说,怕什么系统性金融危机,反正政府都能兜底,危机很快就会被摁下去。
但问题是,政府并非万能,关键是,救市需要钱。
如果这时候政府自己都有财政危机,救市的难度就会明显升级。
巨额资金的需求,会让本就不宽裕的政府财政压力猛增。政府债务会短时间迅速攀升,财政赤字严重扩大。
这时候更可怕的就来了:国家信用评级会被下调,这就进一步加剧了信心的缺失,同时也推高了融资成本。
系统性金融危机可不仅仅是个经济问题,它很多时候还会引发严重的社会问题。
危机发生后,企业大量倒闭、股市房价暴跌,导致家庭资产出现严重贬值。这样一来,民众收入明显下降、对未来缺乏信心,生活水平也会跟随大幅下降。
这种情势,势必会让社会的不安情绪滋长。
在2008年金融危机之后,许多国家就出现了大规模的抗议示威活动。这时候政府会焦头烂额——既要挽救金融体系,又要面临巨大的稳定压力,动荡的风险会明显加剧。
系统性金融危机发生过后,随着资产泡沫的出清和危机逐渐走向尾声,经济的长远前景会受到进一步打击。
因为经济最重要的源泉是信心,当所有人都在危机中缺乏对未来的信心,想要重建起来就会非常不易而且漫长。
系统性金融危机到底有多可怕?它对一个国家来说,不仅意味着深重的经济和灾难,而且会导致严重的社会灾难。
严重的经济衰退和社会不安的阴霾将会持续笼罩,政府的一些干预措施,虽然能在一定程度上缓解危机,但背后却是巨大的财政压力和政治上的脆弱性——因为民众一定会将不满的矛头指向政府。
所以,预防系统性金融危机就是重中之重。
以上的金融危机诱因,每一项都来自长期的政府不作为、腐败或者金融体系的过度投机,所以必须要从制度和法律上规范金融市场、资本市场、房地产市场等等。
否则,当内里早就烂透了,总有一天会捂不住的。当危机被触发,一切都会悔之晚矣。
(全文完)
最近关于 AIGC 的关注度太高了,自己也时不时会抽空去了解一些情况,或者尝试去用一些工具。很多关于 AI 要替代人的观点大行其道,也一直有不少 AI 要让设计师失业的看法在坊间流传。但我自己的感受和看法是:
在 Midjourney、Stable Diffusion、ChatGPT 这些 AI 工具出现后,「手头功夫」并没有因此丧失意义,它们只是不再具备作为门槛的价值,但依旧是重要的前提。因为「手头功夫」是培养我们发掘问题、判断优劣和快速取舍的重要训练,缺少这部分锻炼,会让人在这一系列 AI 工具面前感到无力。准确地识别问题并提出诉求,这是未来教育的重中之重,也会反过来强调人的价值。
正好,前段时间后浪送了我一本书,是前微软包容性设计的首席总监 Kat Holmes 写的《误配》。一边看这本书,我就一边在结合自己的工作和最近关于 AIGC 的思考,我觉得这本书里提倡的理念,正好回应了当下的舆论思潮。
大部分谈论设计的书,都在试图通过图形和案例来构建一类理论和范式。但在这个 AIGC 日进八万步的新时代里,设计师要以什么身份来参与?我认为所有的既定范式,都会在三到五年之内被全部击碎。串联、融汇、杂交才是新世界的主流,创作者的身份将愈加模糊,甲乙方的界限也会逐渐消失或扭转。怎么回应这样的快速变化?我觉得《误配》这本首版于五年前的「旧书」,提出了很适合当下思考的母题:
设计行为、设计师、设计对象以及新技术之间,如何在智能化浪潮里,互相包容和一起进化?
这本书没有给出直接的答案,但对于有三年以上工作经验的设计师而言,带着经验、问题和困难去阅读,会有启发和收获。「物」的旧体系正在溃散,「系统」和「生态」将是历史的新主角。旧时代的残党,可以下船了。
昨天在各个社交媒体上发了一下自己的读书感受,因为被后浪的微博官号转发了,于是被这本书的译者何盈女士注意到。正巧我的朋友宋喆在刷朋友圈时看到她的这条寻人启事,就这么阴差阳错地跟她直接联系上了。
这种「地球村」的感觉很妙!
这更坚定了我今年一定要 重新启动设计纪录片 的决心了!
Command | Description | |
• | grep . /proc/sys/net/ipv4/* | List the contents of flag files |
• | set | grep $USER | Search current environment |
• | tr '\0' '\n' < /proc/$$/environ | Display the startup environment for any process |
• | echo $PATH | tr : '\n' | Display the $PATH one per line |
• | kill -0 $$ && echo process exists and can accept signals | Check for the existence of a process (pid) |
• | find /etc -readable | xargs less -K -p'*ntp' -j $((${LINES:-25}/2)) | Search paths and data with full context. Use n to iterate |
Low impact admin | ||
# | apt-get install "package" -o Acquire::http::Dl-Limit=42 \ -o Acquire::Queue-mode=access | Rate limit apt-get to 42KB/s |
echo 'wget url' | at 01:00 | Download url at 1AM to current dir | |
# | apache2ctl configtest && apache2ctl graceful | Restart apache if config is OK |
• | nice openssl speed sha1 | Run a low priority command (openssl benchmark) |
• | chrt -i 0 openssl speed sha1 | Run a low priority command (more effective than nice) |
• | renice 19 -p $$; ionice -c3 -p $$ | Make shell (script) low priority. Use for non interactive tasks |
Interactive monitoring | ||
• | watch -t -n1 uptime | Clock with system load |
• | htop -d 5 | Better top (scrollable, tree view, lsof/strace integration, ...) |
• | iotop | What's doing I/O |
# | watch -d -n30 "nice ps_mem.py | tail -n $((${LINES:-12}-2))" | What's using RAM |
# | iftop | What's using the network. See also iptraf |
# | mtr www.pixelbeat.org | ping and traceroute combined |
Useful utilities | ||
• | pv < /dev/zero > /dev/null | Progress Viewer for data copying from files and pipes |
• | wkhtml2pdf http://.../linux_commands.html linux_commands.pdf | Make a pdf of a web page |
• | timeout 1 sleep 3 | run a command with bounded time. See also timeout |
Networking | ||
• | python -m SimpleHTTPServer | Serve current directory tree at http://$HOSTNAME:8000/ |
• | openssl s_client -connect www.google.com:443 </dev/null 2>&0 | openssl x509 -dates -noout | Display the date range for a site's certs |
• | curl -I www.pixelbeat.org | Display the server headers for a web site |
# | lsof -i tcp:80 | What's using port 80 |
# | httpd -S | Display a list of apache virtual hosts |
• | vim scp://user@remote//path/to/file | Edit remote file using local vim. Good for high latency links |
• | curl -s http://www.pixelbeat.org/pixelbeat.asc | gpg --import | Import a gpg key from the web |
• | tc qdisc add dev lo root handle 1:0 netem delay 20msec | Add 20ms latency to loopback device (for testing) |
• | tc qdisc del dev lo root | Remove latency added above |
Notification | ||
• | echo "DISPLAY=$DISPLAY xmessage cooker" | at "NOW +30min" | Popup reminder |
• | notify-send "subject" "message" | Display a gnome popup notification |
echo "mail -s 'go home' P@draigBrady.com < /dev/null" | at 17:30 | Email reminder | |
uuencode file name | mail -s subject P@draigBrady.com | Send a file via email | |
ansi2html.sh | mail -a "Content-Type: text/html" P@draigBrady.com | Send/Generate HTML email | |
Better default settings (useful in your .bashrc) | ||
# | tail -s.1 -f /var/log/messages | Display file additions more responsively |
• | seq 100 | tail -n $((${LINES:-12}-2)) | Display as many lines as possible without scrolling |
# | tcpdump -s0 | Capture full network packets |
Useful functions/aliases (useful in your .bashrc) | ||
• | md () { mkdir -p "$1" && cd "$1"; } | Change to a new directory |
• | strerror() { python -c "import os; print os.strerror($1)"; } | Display the meaning of an errno |
• | plot() { { echo 'plot "-"' "$@"; cat; } | gnuplot -persist; } | Plot stdin. (e.g: • seq 1000 | sed 's/.*/s(&)/' | bc -l | plot) |
• | hili() { e="$1"; shift; grep --col=always -Eih "$e|$" "$@"; } | highlight occurences of expr. (e.g: • env | hili $USER) |
• | alias hd='od -Ax -tx1z -v' | Hexdump. (usage e.g.: • hd /proc/self/cmdline | less) |
• | alias realpath='readlink -f' | Canonicalize path. (usage e.g.: • realpath ~/../$USER) |
• | ord() { printf "0x%x\n" "'$1"; } | shell version of the ord() function |
• | chr() { printf $(printf '\\%03o\\n' "$1"); } | shell version of the chr() function |
Multimedia | ||
• | DISPLAY=:0.0 import -window root orig.png | Take a (remote) screenshot |
• | convert -filter catrom -resize '600x>' orig.png 600px_wide.png | Shrink to width, computer gen images or screenshots |
mplayer -ao pcm -vo null -vc dummy /tmp/Flash* | Extract audio from flash video to audiodump.wav | |
ffmpeg -i filename.avi | Display info about multimedia file | |
• | ffmpeg -f x11grab -s xga -r 25 -i :0 -sameq demo.mpg | Capture video of an X display |
DVD | ||
for i in $(seq 9); do ffmpeg -i $i.avi -target pal-dvd $i.mpg; done | Convert video to the correct encoding and aspect for DVD | |
dvdauthor -odvd -t -v "pal,4:3,720xfull" *.mpg;dvdauthor -odvd -T | Build DVD file system. Use 16:9 for widescreen input | |
growisofs -dvd-compat -Z /dev/dvd -dvd-video dvd | Burn DVD file system to disc | |
Unicode | ||
• | python -c "import unicodedata as u; print u.name(unichr(0x2028))" | Lookup a unicode character |
• | uconv -f utf8 -t utf8 -x nfc | Normalize combining characters |
• | printf '\300\200' | iconv -futf8 -tutf8 >/dev/null | Validate UTF-8 |
• | printf 'ŨTF8\n' | LANG=C grep --color=always '[^ -~]\+' | Highlight non printable ASCII chars in UTF-8 |
• | fc-match -s "sans:lang=zh" | List font match order for language and style |
Development | ||
• | gcc -march=native -E -v -</dev/null 2>&1|sed -n 's/.*-mar/-mar/p' | Show autodetected gcc tuning params. See also gcccpuopt |
• | for i in $(seq 4); do { [ $i = 1 ] && wget http://url.ie/6lko -qO-|| ./a.out; } | tee /dev/tty | gcc -xc - 2>/dev/null; done | Compile and execute C code from stdin |
• | cpp -dM /dev/null | Show all predefined macros |
• | echo "#include <features.h>" | cpp -dN | grep "#define __USE_" | Show all glibc feature macros |
gdb -tui | Debug showing source code context in separate windows | |
udev | ||
• | udevadm info -a -p $(udevadm info -q path -n /dev/input/mouse0) | List udev attributes of a device, for matching rules etc. |
• | udevadm test /sys/class/input/mouse0 | See how udev rules are applied for a device |
# | udevadm control --reload-rules | Reload udev rules after modification |
Extended Attributes (Note you may need to (re)mount with "acl" or "user_xattr" options) | ||
• | getfacl . | Show ACLs for file |
• | setfacl -m u:nobody:r . | Allow a specific user to read file |
• | setfacl -x u:nobody . | Delete a specific user's rights to file |
setfacl --default -m group:users:rw- dir/ | Set umask for a for a specific dir | |
getcap file | Show capabilities for a program | |
setcap cap_net_raw+ep your_gtk_prog | Allow gtk program raw access to network | |
• | stat -c%C . | Show SELinux context for file |
chcon ... file | Set SELinux context for file (see also restorecon) | |
• | getfattr -m- -d . | Show all extended attributes (includes selinux,acls,...) |
• | setfattr -n "user.foo" -v "bar" . | Set arbitrary user attributes |
BASH specific | ||
• | echo 123 | tee >(tr 1 a) | tr 1 b | Split data to 2 commands (using process substitution) |
meld local_file <(ssh host cat remote_file) | Compare a local and remote file (using process substitution) | |
Multicore | ||
• | taskset -c 0 nproc | Restrict a command to certain processors |
• | find -type f -print0 | xargs -r0 -P$(nproc) -n10 md5sum | Process files in parallel over available processors |
sort -m <(sort data1) <(sort data2) >data.sorted | Sort separate data files over 2 processors |
This is a linux command line reference for common operations. Examples marked with • are valid/safe to paste without modification into a terminal, so you may want to keep a terminal window open while reading this so you can cut & paste. All these commands have been tested both on Fedora and Ubuntu. See also more linux commands. |
Command | Description | |
• | apropos whatis | Show commands pertinent to string. See also threadsafe |
• | man -t ascii | ps2pdf - > ascii.pdf | make a pdf of a manual page |
which command | Show full path name of command | |
time command | See how long a command takes | |
• | time cat | Start stopwatch. Ctrl-d to stop. See also sw |
dir navigation | ||
• | cd - | Go to previous directory |
• | cd | Go to $HOME directory |
(cd dir && command) | Go to dir, execute command and return to current dir | |
• | pushd . | Put current dir on stack so you can popd back to it |
file searching | ||
• | alias l='ls -l --color=auto' | quick dir listing |
• | ls -lrt | List files by date. See also newest and find_mm_yyyy |
• | ls /usr/bin | pr -T9 -W$COLUMNS | Print in 9 columns to width of terminal |
find -name '*.[ch]' | xargs grep -E 'expr' | Search 'expr' in this dir and below. See also findrepo | |
find -type f -print0 | xargs -r0 grep -F 'example' | Search all regular files for 'example' in this dir and below | |
find -maxdepth 1 -type f | xargs grep -F 'example' | Search all regular files for 'example' in this dir | |
find -maxdepth 1 -type d | while read dir; do echo $dir; echo cmd2; done | Process each item with multiple commands (in while loop) | |
• | find -type f ! -perm -444 | Find files not readable by all (useful for web site) |
• | find -type d ! -perm -111 | Find dirs not accessible by all (useful for web site) |
• | locate -r 'file[^/]*\.txt' | Search cached index for names. This re is like glob *file*.txt |
• | look reference | Quickly search (sorted) dictionary for prefix |
• | grep --color reference /usr/share/dict/words | Highlight occurances of regular expression in dictionary |
archives and compression | ||
gpg -c file | Encrypt file | |
gpg file.gpg | Decrypt file | |
tar -c dir/ | bzip2 > dir.tar.bz2 | Make compressed archive of dir/ | |
bzip2 -dc dir.tar.bz2 | tar -x | Extract archive (use gzip instead of bzip2 for tar.gz files) | |
tar -c dir/ | gzip | gpg -c | ssh user@remote 'dd of=dir.tar.gz.gpg' | Make encrypted archive of dir/ on remote machine | |
find dir/ -name '*.txt' | tar -c --files-from=- | bzip2 > dir_txt.tar.bz2 | Make archive of subset of dir/ and below | |
find dir/ -name '*.txt' | xargs cp -a --target-directory=dir_txt/ --parents | Make copy of subset of dir/ and below | |
(tar -c /dir/to/copy) | ( cd /where/to/ && tar -x -p ) | Copy (with permissions) copy/ dir to /where/to/ dir | |
(cd /dir/to/copy && tar -c .) | ( cd /where/to/ && tar -x -p ) | Copy (with permissions) contents of copy/ dir to /where/to/ | |
(tar -c /dir/to/copy ) | ssh -C user@remote 'cd /where/to/ && tar -x -p' | Copy (with permissions) copy/ dir to remote:/where/to/ dir | |
dd bs=1M if=/dev/sda | gzip | ssh user@remote 'dd of=sda.gz' | Backup harddisk to remote machine | |
rsync (Network efficient file copier: Use the --dry-run option for testing) | ||
rsync -P rsync://rsync.server.com/path/to/file file | Only get diffs. Do multiple times for troublesome downloads | |
rsync --bwlimit=1000 fromfile tofile | Locally copy with rate limit. It's like nice for I/O | |
rsync -az -e ssh --delete ~/public_html/ remote.com:'~/public_html' | Mirror web site (using compression and encryption) | |
rsync -auz -e ssh remote:/dir/ . && rsync -auz -e ssh . remote:/dir/ | Synchronize current directory with remote one | |
ssh (Secure SHell) | ||
ssh $USER@$HOST command | Run command on $HOST as $USER (default command=shell) | |
• | ssh -f -Y $USER@$HOSTNAME xeyes | Run GUI command on $HOSTNAME as $USER |
scp -p -r $USER@$HOST: file dir/ | Copy with permissions to $USER's home directory on $HOST | |
scp -c arcfour $USER@$LANHOST: bigfile | Use faster crypto for local LAN. This might saturate GigE | |
ssh -g -L 8080:localhost:80 root@$HOST | Forward connections to $HOSTNAME:8080 out to $HOST:80 | |
ssh -R 1434:imap:143 root@$HOST | Forward connections from $HOST:1434 in to imap:143 | |
ssh-copy-id $USER@$HOST | Install public key for $USER@$HOST for password-less log in | |
wget (multi purpose download tool) | ||
• | (cd dir/ && wget -nd -pHEKk http://www.pixelbeat.org/cmdline.html) | Store local browsable version of a page to the current dir |
wget -c http://www.example.com/large.file | Continue downloading a partially downloaded file | |
wget -r -nd -np -l1 -A '*.jpg' http://www.example.com/dir/ | Download a set of files to the current directory | |
wget ftp://remote/file[1-9].iso/ | FTP supports globbing directly | |
• | wget -q -O- http://www.pixelbeat.org/timeline.html | grep 'a href' | head | Process output directly |
echo 'wget url' | at 01:00 | Download url at 1AM to current dir | |
wget --limit-rate=20k url | Do a low priority download (limit to 20KB/s in this case) | |
wget -nv --spider --force-html -i bookmarks.html | Check links in a file | |
wget --mirror http://www.example.com/ | Efficiently update a local copy of a site (handy from cron) | |
networking (Note ifconfig, route, mii-tool, nslookup commands are obsolete) | ||
ethtool eth0 | Show status of ethernet interface eth0 | |
ethtool --change eth0 autoneg off speed 100 duplex full | Manually set ethernet interface speed | |
iwconfig eth1 | Show status of wireless interface eth1 | |
iwconfig eth1 rate 1Mb/s fixed | Manually set wireless interface speed | |
• | iwlist scan | List wireless networks in range |
• | ip link show | List network interfaces |
ip link set dev eth0 name wan | Rename interface eth0 to wan | |
ip link set dev eth0 up | Bring interface eth0 up (or down) | |
• | ip addr show | List addresses for interfaces |
ip addr add 1.2.3.4/24 brd + dev eth0 | Add (or del) ip and mask (255.255.255.0) | |
• | ip route show | List routing table |
ip route add default via 1.2.3.254 | Set default gateway to 1.2.3.254 | |
• | host pixelbeat.org | ookup DNS ip address for name or vice versaL |
• | hostname -i | Lookup local ip address (equivalent to host `hostname`) |
• | whois pixelbeat.org | Lookup whois info for hostname or ip address |
• | netstat -tupl | List internet services on a system |
• | netstat -tup | List active connections to/from system |
windows networking (Note samba is the package that provides all this windows specific networking support) | ||
• | smbtree | Find windows machines. See also findsmb |
nmblookup -A 1.2.3.4 | Find the windows (netbios) name associated with ip address | |
smbclient -L windows_box | List shares on windows machine or samba server | |
mount -t smbfs -o fmask=666,guest //windows_box/share /mnt/share | Mount a windows share | |
echo 'message' | smbclient -M windows_box | Send popup to windows machine (off by default in XP sp2) | |
text manipulation (Note sed uses stdin and stdout. Newer versions support inplace editing with the -i option) | ||
sed 's/string1/string2/g' | Replace string1 with string2 | |
sed 's/\(.*\)1/\12/g' | Modify anystring1 to anystring2 | |
sed '/ *#/d; /^ *$/d' | Remove comments and blank lines | |
sed ':a; /\\$/N; s/\\\n//; ta' | Concatenate lines with trailing \ | |
sed 's/[ \t]*$//' | Remove trailing spaces from lines | |
sed 's/\([`"$\]\)/\\\1/g' | Escape shell metacharacters active within double quotes | |
• | seq 10 | sed "s/^/ /; s/ *\(.\{7,\}\)/\1/" | Right align numbers |
sed -n '1000{p;q}' | Print 1000th line | |
sed -n '10,20p;20q' | Print lines 10 to 20 | |
sed -n 's/.*<title>\(.*\)<\/title>.*/\1/ip;T;q' | Extract title from HTML web page | |
sed -i 42d ~/.ssh/known_hosts | Delete a particular line | |
sort -t. -k1,1n -k2,2n -k3,3n -k4,4n | Sort IPV4 ip addresses | |
• | echo 'Test' | tr '[:lower:]' '[:upper:]' | Case conversion |
• | tr -dc '[:print:]' < /dev/urandom | Filter non printable characters |
• | tr -s '[:blank:]' '\t' </proc/diskstats | cut -f4 | cut fields separated by blanks |
• | history | wc -l | Count lines |
set operations (Note you can export LANG=C for speed. Also these assume no duplicate lines within a file) | ||
sort file1 file2 | uniq | Union of unsorted files | |
sort file1 file2 | uniq -d | Intersection of unsorted files | |
sort file1 file1 file2 | uniq -u | Difference of unsorted files | |
sort file1 file2 | uniq -u | Symmetric Difference of unsorted files | |
join -t'\0' -a1 -a2 file1 file2 | Union of sorted files | |
join -t'\0' file1 file2 | Intersection of sorted files | |
join -t'\0' -v2 file1 file2 | Difference of sorted files | |
join -t'\0' -v1 -v2 file1 file2 | Symmetric Difference of sorted files | |
math | ||
• | echo '(1 + sqrt(5))/2' | bc -l | Quick math (Calculate φ). See also bc |
• | seq -f '4/%g' 1 2 99999 | paste -sd-+ | bc -l | Calculate π the unix way |
• | echo 'pad=20; min=64; (100*10^6)/((pad+min)*8)' | bc | More complex (int) e.g. This shows max FastE packet rate |
• | echo 'pad=20; min=64; print (100E6)/((pad+min)*8)' | python | Python handles scientific notation |
• | echo 'pad=20; plot [64:1518] (100*10**6)/((pad+x)*8)' | gnuplot -persist | Plot FastE packet rate vs packet size |
• | echo 'obase=16; ibase=10; 64206' | bc | Base conversion (decimal to hexadecimal) |
• | echo $((0x2dec)) | Base conversion (hex to dec) ((shell arithmetic expansion)) |
• | units -t '100m/9.58s' 'miles/hour' | Unit conversion (metric to imperial) |
• | units -t '500GB' 'GiB' | Unit conversion (SI to IEC prefixes) |
• | units -t '1 googol' | Definition lookup |
• | seq 100 | (tr '\n' +; echo 0) | bc | Add a column of numbers. See also add and funcpy |
calendar | ||
• | cal -3 | Display a calendar |
• | cal 9 1752 | Display a calendar for a particular month year |
• | date -d fri | What date is it this friday. See also day |
• | [ $(date -d '12:00 +1 day' +%d) = '01' ] || exit | exit a script unless it's the last day of the month |
• | date --date='25 Dec' +%A | What day does xmas fall on, this year |
• | date --date='@2147483647' | Convert seconds since the epoch (1970-01-01 UTC) to date |
• | TZ='America/Los_Angeles' date | What time is it on west coast of US (use tzselect to find TZ) |
• | date --date='TZ="America/Los_Angeles" 09:00 next Fri' | What's the local time for 9AM next Friday on west coast US |
locales | ||
• | printf "%'d\n" 1234 | Print number with thousands grouping appropriate to locale |
• | BLOCK_SIZE=\'1 ls -l | Use locale thousands grouping in ls. See also l |
• | echo "I live in `locale territory`" | Extract info from locale database |
• | LANG=en_IE.utf8 locale int_prefix | Lookup locale info for specific country. See also ccodes |
• | locale -kc $(locale | sed -n 's/\(LC_.\{4,\}\)=.*/\1/p') | less | List fields available in locale database |
recode (Obsoletes iconv, dos2unix, unix2dos) | ||
• | recode -l | less | Show available conversions (aliases on each line) |
recode windows-1252.. file_to_change.txt | Windows "ansi" to local charset (auto does CRLF conversion) | |
recode utf-8/CRLF.. file_to_change.txt | Windows utf8 to local charset | |
recode iso-8859-15..utf8 file_to_change.txt | Latin9 (western europe) to utf8 | |
recode ../b64 < file.txt > file.b64 | Base64 encode | |
recode /qp.. < file.qp > file.txt | Quoted printable decode | |
recode ..HTML < file.txt > file.html | Text to HTML | |
• | recode -lf windows-1252 | grep euro | Lookup table of characters |
• | echo -n 0x80 | recode latin-9/x1..dump | Show what a code represents in latin-9 charmap |
• | echo -n 0x20AC | recode ucs-2/x2..latin-9/x | Show latin-9 encoding |
• | echo -n 0x20AC | recode ucs-2/x2..utf-8/x | Show utf-8 encoding |
CDs | ||
gzip < /dev/cdrom > cdrom.iso.gz | Save copy of data cdrom | |
mkisofs -V LABEL -r dir | gzip > cdrom.iso.gz | Create cdrom image from contents of dir | |
mount -o loop cdrom.iso /mnt/dir | Mount the cdrom image at /mnt/dir (read only) | |
cdrecord -v dev=/dev/cdrom blank=fast | Clear a CDRW | |
gzip -dc cdrom.iso.gz | cdrecord -v dev=/dev/cdrom - | Burn cdrom image (use dev=ATAPI -scanbus to confirm dev) | |
cdparanoia -B | Rip audio tracks from CD to wav files in current dir | |
cdrecord -v dev=/dev/cdrom -audio -pad *.wav | Make audio CD from all wavs in current dir (see also cdrdao) | |
oggenc --tracknum='track' track.cdda.wav -o 'track.ogg' | Make ogg file from wav file | |
disk space (See also FSlint) | ||
• | ls -lSr | Show files by size, biggest last |
• | du -s * | sort -k1,1rn | head | Show top disk users in current dir. See also dutop |
• | du -hs /home/* | sort -k1,1h | Sort paths by easy to interpret disk usage |
• | df -h | Show free space on mounted filesystems |
• | df -i | Show free inodes on mounted filesystems |
• | fdisk -l | Show disks partitions sizes and types (run as root) |
• | rpm -q -a --qf '%10{SIZE}\t%{NAME}\n' | sort -k1,1n | List all packages by installed size (Bytes) on rpm distros |
• | dpkg-query -W -f='${Installed-Size;10}\t${Package}\n' | sort -k1,1n | List all packages by installed size (KBytes) on deb distros |
• | dd bs=1 seek=2TB if=/dev/null of=ext3.test | Create a large test file (taking no space). See also truncate |
• | > file | truncate data of file or create an empty file |
monitoring/debugging | ||
• | tail -f /var/log/messages | Monitor messages in a log file |
• | strace -c ls >/dev/null | Summarise/profile system calls made by command |
• | strace -f -e open ls >/dev/null | List system calls made by command |
• | strace -f -e trace=write -e write=1,2 ls >/dev/null | Monitor what's written to stdout and stderr |
• | ltrace -f -e getenv ls >/dev/null | List library calls made by command |
• | lsof -p $$ | List paths that process id has open |
• | lsof ~ | List processes that have specified path open |
• | tcpdump not port 22 | Show network traffic except ssh. See also tcpdump_not_me |
• | ps -e -o pid,args --forest | List processes in a hierarchy |
• | ps -e -o pcpu,cpu,nice,state,cputime,args --sort pcpu | sed '/^ 0.0 /d' | List processes by % cpu usage |
• | ps -e -orss=,args= | sort -b -k1,1n | pr -TW$COLUMNS | List processes by mem (KB) usage. See also ps_mem.py |
• | ps -C firefox-bin -L -o pid,tid,pcpu,state | List all threads for a particular process |
• | ps -p 1,$$ -o etime= | List elapsed wall time for particular process IDs |
• | last reboot | Show system reboot history |
• | free -m | Show amount of (remaining) RAM (-m displays in MB) |
• | watch -n.1 'cat /proc/interrupts' | Watch changeable data continuously |
• | udevadm monitor | Monitor udev events to help configure rules |
system information (see also sysinfo) ('#' means root access is required) | ||
• | uname -a | Show kernel version and system architecture |
• | head -n1 /etc/issue | Show name and version of distribution |
• | cat /proc/partitions | Show all partitions registered on the system |
• | grep MemTotal /proc/meminfo | Show RAM total seen by the system |
• | grep "model name" /proc/cpuinfo | Show CPU(s) info |
• | lspci -tv | Show PCI info |
• | lsusb -tv | Show USB info |
• | mount | column -t | List mounted filesystems on the system (and align output) |
• | grep -F capacity: /proc/acpi/battery/BAT0/info | Show state of cells in laptop battery |
# | dmidecode -q | less | Display SMBIOS/DMI information |
# | smartctl -A /dev/sda | grep Power_On_Hours | How long has this disk (system) been powered on in total |
# | hdparm -i /dev/sda | Show info about disk sda |
# | hdparm -tT /dev/sda | Do a read speed test on disk sda |
# | badblocks -s /dev/sda | Test for unreadable blocks on disk sda |
interactive (see also linux keyboard shortcuts) | ||
• | readline | Line editor used by bash, python, bc, gnuplot, ... |
• | screen | Virtual terminals with detach capability, ... |
• | mc | Powerful file manager that can browse rpm, tar, ftp, ssh, ... |
• | gnuplot | Interactive/scriptable graphing |
• | links | Web browser |
• | xdg-open . | open a file or url with the registered desktop application |
# uname -a # 查看内核/操作系统/CPU信息 # head -n 1 /etc/issue # 查看操作系统版本 # cat /proc/cpuinfo # 查看CPU信息 # hostname # 查看计算机名 # lspci -tv # 列出所有PCI设备 # lsusb -tv # 列出所有USB设备 # lsmod # 列出加载的内核模块 # env # 查看环境变量
# free -m # 查看内存使用量和交换区使用量 # df -h # 查看各分区使用情况 # du -sh <目录名> # 查看指定目录的大小 # grep MemTotal /proc/meminfo # 查看内存总量 # grep MemFree /proc/meminfo # 查看空闲内存量 # uptime # 查看系统运行时间、用户数、负载 # cat /proc/loadavg # 查看系统负载
# mount | column -t # 查看挂接的分区状态 # fdisk -l # 查看所有分区 # swapon -s # 查看所有交换分区 # hdparm -i /dev/hda # 查看磁盘参数(仅适用于IDE设备) # dmesg | grep IDE # 查看启动时IDE设备检测状况
# ifconfig # 查看所有网络接口的属性 # iptables -L # 查看防火墙设置 # route -n # 查看路由表 # netstat -lntp # 查看所有监听端口 # netstat -antp # 查看所有已经建立的连接 # netstat -s # 查看网络统计信息
# ps -ef # 查看所有进程 # top # 实时显示进程状态
# w # 查看活动用户 # id <用户名> # 查看指定用户信息 # last # 查看用户登录日志 # cut -d: -f1 /etc/passwd # 查看系统所有用户 # cut -d: -f1 /etc/group # 查看系统所有组 # crontab -l # 查看当前用户的计划任务
# chkconfig --list # 列出所有系统服务 # chkconfig --list | grep on # 列出所有启动的系统服务
# rpm -qa # 查看所有安装的软件包
附加一张总结的很好Linux常用命定的图片:
![]() |
Linux 文件结构大全 |