阅读视图

发现新文章,点击刷新页面。

精锻科技:当前公司机器人业务尚未形成销售收入

精锻科技在业绩说明会表示,公司机器人相关业务目前仍处于研发和市场开拓阶段,量产设备计划于2026年陆续到位并安装调试,但规模化生产需待客户验证通过及订单落地,具体时间表存在不确定性。当前公司机器人业务尚未形成销售收入,敬请关注投资风险。(证券时报)

恒指午间休盘涨1.7%,恒生科技指数涨2.86%

36氪获悉,恒指午间休盘涨1.7%,恒生科技指数涨2.86%;硬件设备、半导体、零售板块领涨,天数智芯涨超15%,剑桥科技涨超14%,小米集团涨超8%,阿里巴巴涨超5%;石油石化、钢铁、煤炭板块跌幅居前,首佳科技跌超9%,中港石油跌超5%,蒙古能源跌超3%。

一季度末股东户数下降公司排行:16家公司降逾40%

根据统计,剔除2026年上市的次新股后,截至2026年一季度末,与2025年末相比,有16家A股上市公司股东户数降幅超过40%,其中,富临精工、誉帆科技降幅超过50%。富临精工为创业板公司,公司主要业务为汽车发动机零部件、新能源汽车智能电控和新能源锂电正极材料的研发、生产和销售。行业分布方面,按申万一级行业分类,这16家公司中,3家为机械设备行业,3家为轻工制造行业,另外,汽车、商业贸易均有两家。股价方面,今年以来,富临精工涨68%,扬子新材涨50%。(证券时报)

国开行一季度发放专项转贷款285.4亿元支持外贸小微企业发展

记者从国家开发银行获悉,今年一季度,国开行发放稳外贸专项转贷款285.4亿元,支持外贸小微企业超6500户(次),用款人加权平均利率低于全国同期新发放普惠小微贷款利率,有效帮助相关企业缓解资金压力,稳订单、拓市场、稳就业。(新华社)

新加坡航空明年起将在部分飞机上部署星链Wi-Fi

新加坡航空公司表示,该公司将从2027年第一季度开始逐步推出星链的低地球轨道卫星宽带服务,预计将于2029年底完成部署。新加坡航空所有空客A350-900远程客机、A350-900超远程客机和A380客机的乘客均可享受星链高速网络连接服务。(新浪财经)

今天全国铁路预计发送旅客2030万人次

铁路方面,记者从国铁集团了解到,今天(5月4日),全国铁路预计发送旅客2030万人次,计划加开旅客列车1641列。昨天(5月3日),全国铁路发送旅客1859.8万人次,运输安全平稳有序。(央视新闻)

三星电子任命新的视觉显示业务负责人

韩国三星电子周一宣布了一项领导层调整,任命新的视觉显示业务负责人以应对当前挑战。此次调整后,原全球营销办公室负责人Lee Won-jin,将正式出任该业务部门负责人。三星在一份声明中表示:“凭借其过往的商业成就和市场洞察力,Lee Won-jin,有望带领团队扭转业务颓势,发掘新的增长点,从而进一步提升视觉显示业务的竞争力。(新浪财经)

恒指开盘涨1.4%,恒生科技指数涨1.58%

36氪获悉,恒指开盘涨1.4%,恒生科技指数涨1.58%;半导体、电气设备板块领涨,天数智芯涨超12%,宁德时代涨超3%;保健品、智能物流板块跌幅居前,顺丰同城跌超2%,华润医药跌超1%。

东阳光药甘精胰岛素获FDA批准

36氪获悉,东阳光药公告,其自主研发的甘精胰岛素注射液(商品名:Langlara)正式获美国FDA批准上市,成为第4款在美上市的甘精胰岛素产品,也是首个登陆美国市场的中国胰岛素。该产品同时获得“可互换”标签,可在药房直接替代原研药Lantus®。公司已与美国Lannett公司达成独家合作,并获得首批至少1800万支、供应期18个月的订单。此外,门冬胰岛素预计2028年在美获批,德谷胰岛素在美国的开发也在积极推进中。

游戏驿站提出近560亿美元收购eBay

据报道,游戏驿站CEO瑞安·科恩表示,他已主动提出以约560亿美元收购eBay。科恩称,游戏驿站已持有eBay约5%股份,提出以每股125美元现金加股票收购,较eBay上周五收盘价溢价约20%。(界面)

传小米新 SU7 锁单突破 7 万;微信输入法测「隔空发图」功能;豆包二代 AI 手机上半年发布

即将超越英伟达!谷歌母公司 Alphabet 市值已达 4.6 万亿美元

5 月 3 日消息,据媒体报道,受超预期财报提振,谷歌母公司 Alphabet 股价周四(4 月 30 日)大涨 10%,年内累计涨幅达到 140%,市值突破 4.6 万亿美元。

该公司周三公布的营收超出分析师预期,其中谷歌云业务收入更是突破 200 亿美元大关。

目前,全球市值第一的公司仍是人工智能芯片霸主英伟达,市值接近 4.9 万亿美元。不过,由于商业伙伴 OpenAI 被曝未能达成内部收入与增长预期,英伟达股价在两天内累计下跌超过 6%。

若英伟达在 5 月 20 日发布的财报中未能实现反弹,期權市场预测,Alphabet 最早可能在 5 月 15 日登顶全球市值第一。要实现这一目标,Alphabet 的市值需要追上英伟达当前水平,股价需再上涨约 4%,达到约 401 美元。

期权交易员认为,从现在到 5 月 15 日之间,Alphabet 股价触及 401 美元的概率约为 53%。

另据 ThinkOrSwim 数据显示,Alphabet 股价在 5 月 22 日(即英伟达财报发布后的星期五)收于 400 美元以上的概率约为 30%。

值得一提的是,Alphabet 上一次成为全球市值最高的公司是在 2016 年,当时它曾短暂超越苹果,登上榜首。(来源: 快科技)

黄仁勋称英伟达中国市场份额已降为零,美国出口管制效果适得其反

5 月 3 日消息,英伟达(Nvidia)CEO 黄仁勋 4 月 30 日在接受特别竞争研究项目(SCSP)采访时表示,该公司在中国 AI 加速器市场的份额已降至 0%(注:他这里仅谈及英伟达直接面向中国客户的销售)。

黄仁勋直言:「放弃像中国这样规模的一整个完整市场,在战略上恐怕并不合理,所以我认为这在很大程度上已经产生了反效果。我认为政策确实需要动态调整,需要保持与时俱进。我可以说,让美国芯片公司和其他美国企业留在中国市场,是非常有意义的。」

今年早些时候,伯恩斯坦(Bernstein)曾预测英伟达在中国 AI GPU 市场的份额可能从 2024 年的 66% 下降到未来几年的 8% 左右。不过根据黄仁勋的说法,这一下降趋势比预期更为剧烈。

与此同时,黄仁勋指出,即便没有美国开发的先进 AI GPU 和软件技术栈,中国在前沿 AI 模型领域仍是一个不容忽视的竞争对手。

实际上,中国开发者正越来越多地使用本土硬件,但在软件领域,尤其是所谓的「CUDA 护城河」,目前仍是美国 AI 技术的主要阵地,中国本土公司尚未完全攻克。

黄仁勋最后还警告称,威胁叙事和出口管制可能会在更宏观的层面上拖慢 AI 部署进程,而中国等其他地区正更积极地将 AI 作为经济工具加以接纳。他认为,长期的领导地位不应依赖于限制全球竞争对手,而应取决于确保美国 AI 生态系统在全球范围内占据主导地位。(来源:IT 之家)

谷歌将为 Gemini 投放广告,目前处于准备阶段

据科技媒体 Android Central 报道,谷歌母公司 Alphabet 本周举行财报电话会议,首席商务官 Philipp Schindler 在会议中表示,Gemini 未来可能会出现广告。

这名首席商务官在会议中透露:「我们需要明确,广告一直是将产品规模化、覆盖数十亿用户的重要手段。如果执行得当,广告可以非常有价值,也能提供真正有用的商业信息」。

援引 Android Central,谷歌高管说「可能出现广告」代表公司决心已定。并且业内已经有 OpenAI 为 ChatGPT 投放广告。

他也提到,目前谷歌仍在进行准备工作:「我们会在合适的时机公布计划,但不会仓促行事」。如果测试顺利,Gemini 移动端可能会出现广告。

事实上,早在去年 12 月就有传闻称,谷歌正在与广告提供商进行电话会议,预计 2026 年为 Gemini 引入广告。(来源: IT 之家)

美光 CEO 称 AI 仍处于「早期阶段」,DRAM 内存和 NAND 闪存供应持续吃紧

5 月 3 日消息,存储巨头美光科技(Micron)第二财季创下了营收、毛利率、每股收益和自由现金流的多项纪录。

美光 CEO 桑杰・梅赫罗特拉(Sanjay Mehrotra)在接受 CNBC 采访时指出,当前的 AI 浪潮仅处于「早期阶段」,随着 AI 智能体的崛起,更高速、更大容量的存储已成为支撑 AI 发挥全部能力的战略资产。

他表示,随着推理端迎来拐点,Token 生成需求的扩大对内存速度和容量提出了极高要求。然而目前存储行业正面临供应极其紧张的局面,且产能提升并非易事。

他还指出,问题不在于需求或定价,而在于供应商根本无法解决的产能问题,且展望未来,情况也不会有所好转。「目前内存供应非常紧张,而且供应无法轻易跟上,这些都能在我们的业绩中看到。」

美光预测,AI 对 DRAM 和 NAND 的需求预计将在今年超过行业总市场规模(TAM)的 50%。(来源: IT 之家)

马斯克 xAI 坐拥 55 万张英伟达 GPU 但算力利用率仅 11%,Meta 和谷歌可达 43~46%

5 月 3 日消息,据《The Information》报道,马斯克旗下人工智能公司 xAI——也就是 Grok 大模型的幕后团队,目前手头上约有 55 万块英伟达 GPU(包括 H100 与 H200),但实际利用率仅有 11%。

据介绍,这些硬件目前主要部署在孟菲斯的 Colossus 超算集群中,采用液冷配置。尽管与 Blackwell 最新一代产品相比稍显老旧,但这样的体量在全球范围内依然位居前列。

然而,如此海量的硬件并未转化为有效的计算产出。该集群的实际利用率仅有 11%。当然,这并非意味着其余 89% 的 GPU 处于完全闲置状态,而是指模型的实际浮点运算利用率远远低于理论峰值。

业内人士解释称,衡量 AI 算力效率的关键指标叫做 MFU(Model FLOPs Utilization),即模型浮点运算利用率。11% 的 MFU 意味着,理论上能产生 100 份训练吞吐量的硬件,实际只产出了 11 份,大量的电力和硬件时间都消耗在了数据等待、通信开销和重新计算等环节,而没有转化为有效的训练吞吐。

面对这一数字,xAI 总裁 Michael Nicolls 在一份内部备忘录中承认其「低得尴尬」,并为团队设定了在未来几个月内将利用率拉升至 50% 的目标。

xAI 并非个例,算力利用率偏低是整个 AI 基础设施领域的行业性难题。报道指出,在超大规模集群下,软件优化跟不上硬件部署速度是普遍现象。作为对比,Meta 和谷歌在软件堆栈上投入了大量精力,因此其 GPU 利用率相对较高,但也只有约 43% 和约 46%。(来源:IT 之家)

继「液态玻璃」之后:苹果 iOS 27 将重心转向 AI,Siri 迎来独立 App 并将深度整合到相机应用中

5 月 3 日消息,彭博社透露,继去年引入「液态玻璃」界面后,iOS 27 将以渐进式更新为主,重心聚焦于性能提升与 AI 两大领域,降低非核心功能优先级,打造更稳定、且针对 AI 深度优化的系统版本。

iOS 27 中 Siri 将迎来自诞生以来最重大的形态转变,被重塑为带有独立 App 的 AI 聊天机器人,采用极简设计,支持持续对话、历史记录查看、多任务指令处理、跨 App 联动及文件分析等功能,其底层架构基于谷歌 Gemini 技术重塑。

此外,iOS 27 将升级照片 AI 编辑工具,同时将「视觉智能」功能作为全新 Siri 模式整合到相机 App 中,新增通过相机识别食品营养信息、自动提取联系人信息等实用功能。(来源:IT 之家)

红果短剧回应「VIP 付费」:并非新增功能,仅适用于极少量版权方要求的内容

5 月 3 日消息,近期有网友反馈称,在红果短剧 App 中搜索电影《少年往事》,该影片封面左上角出现「VIP」标记,点击后仅能试看 6 分钟,随后页面提示需开通会员才能观看完整版。这一变化引发了部分用户讨论。

针对这一传闻,红果短剧相关负责人 5 月 3 日回应红星资本局称,为增加内容丰富性,满足不同用户的需求,应版权方要求,App 中确有极少量内容仅限开通 VIP 后观看,且该设置自平台上线之初即已存在,并非近期新增的功能。

公开资料显示,红果短剧是抖音集团于 2023 年 8 月正式推出的免费看剧应用,核心运营模式为「免费观看 + 广告分账」,用户通过观看广告可获得「金币」并兑换现金,平台则借助广告流量实现商业化。

依靠这一免费模式,上线不到两年的红果用户规模扩张极为迅猛,根据 QuestMobile 数据,2025 年 9 月其月活跃用户已达约 2.36 亿,超过了哔哩哔哩和优酷视频。

目前红果短剧设定的 VIP 价格体系为:7 天会员 8 元,1 个月会员 30 元,12 个月会员 260 元,暂无其他优惠折扣。(来源:IT 之家)

新一代小米 SU7 锁单突破七万,雷军否认纯靠营销,现阶段重心转向保交付

小米新一代 SU7 交出了一份答卷。根据官方最新披露的数据,新一代 SU7 的锁单量已成功突破 70000 台大关。

小米创始人雷军在此前的直播中,对友商的评价进行了正面反击。针对外界给他贴上的「营销大师」标签,雷军指出这其实是一个精心包装的话术陷阱。他表示,这种表面上的夸奖,实则是为了引导公众产生「小米只靠营销而无硬核技术与质量」的误解,本质上是想通过捧杀来消解小米汽车真正的产品竞争价值。

在直播中,雷军还分享了近期的内心挣扎。他透露,去年由于持续遭受海量负面舆情的裹挟,自己一度产生严重的抵触心理,甚至不想再面对任何直播或公开活动。但考虑到这些恶意揣测正在误导潜在消费者对小米汽车的真实认知,他最终选择强迫自己重回聚光灯下,期望用最直观的沟通,向外界传递小米在制造工艺和品质把控上的死磕精神。(来源: TechWeb)

运营三十年,老牌问答搜索引擎 Ask.com 停止运营

5 月 4 日消息,曾用名爱问吉夫斯(Ask Jeeves)的搜索引擎与问答服务网站 Ask.com 现已正式关停。

爱问吉夫斯于 1996 年首次上线,主打以自然语言解答日常口语化提问,堪称如今人工智能聊天机器人的前身雏形。然而在其近 30 年的发展历程中,始终被其他搜索引擎产品、尤其是谷歌的光芒所掩盖。

控股公司 IAC 于 2005 年收购了爱问吉夫斯,随后很快去掉了名称中的「吉夫斯(Jeeves)」字样;到 2010 年,该平台缩减搜索引擎业务规模,重新聚焦问答服务。同年,IAC 集团董事长巴里・迪勒在 TechCrunch Disrupt 上表示,Ask.com 已无法与谷歌抗衡,且在 IAC 的股价估值中也不再具备价值。

目前 Ask.com 官网发布公告称:「随着 IAC 持续精简业务、聚焦核心发展,我们决定终止旗下包括 Ask.com 在内的搜索业务。历经 25 年为全球用户答疑解惑,Ask.com 已于 2026 年 5 月 1 日正式关停。」

尽管网站已经停运,但其官网仍强调:吉夫斯的精神永不落幕。(来源:IT 之家)

豆包二代 AI 手机上半年发布:搭载第五代骁龙 8 至尊版

5 月 3 日消息,据博主「智慧芯片案内人」透露,第二代豆包 AI 手机有望在 2026 年上半年发布,核心升级为第五代骁龙 8 至尊版。

结合此前消息,第二代豆包 AI 手机依然由字节跳动与中兴通讯联合研发。

硬件端由中兴努比亚负责整机设计、制造与供应链,字节跳动主导「豆包手机助手 2.0」开发,深度集成大模型能力至操作系统底层。

豆包 AI 手机的目标是实现「AI 代为操作手机」的交互范式,而非传统 App 插件式 AI 功能。

据悉,首代豆包手机(努比亚 M153)于 2025 年 12 月以工程样机形式限量发售 3 万台,定价 3499 元,迅速售罄。

尽管因 AI 权限过高遭部分 App 厂商抵制(如微信、美团等限制其调用),但其「一句话自动比价下单」「跨应用任务执行」等能力引发行业震动。

二代机型将基于用户反馈与生态谈判成果,大幅提升产品完成度与兼容性。

消息称,新机可能与阿里系等部分主流应用厂商达成协议,在打车、外卖、订票等高频场景开放必要权限。

需要注意的是,上一代豆包手机就只是工程机,目前不确定这次的二代产品是否会开放给消费者随意购买。(来源: 快科技)

微信输入法内测隔空传送功能,支持跨设备收发照片、视频和文件

5 月 3 日消息,近日,微信输入法开始测试全新「隔空传送」功能,进一步强化跨设备文件传输能力。

想要使用该功能,双端设备均需要升级到最新内测版本(Android / iOS 3.3.0、Windows 2.0.0、MacOS 2.1.0),若你的设备暂未收到更新通知,可以在各端微信输入法帮助与反馈中发送「隔空传送」获取下载链接。

据介绍,该功能支持跨设备发送图片、视频和文件,除了可以给自己的关联设备「隔空传送」,还可以通过扫码建立连接,与其他人进行传送,无需流量。

目前该功能还在测试阶段,只有部分用户可以体验,预计不久后将推出正式版本。(来源:IT 之家)

国内首部院线 AI 原生动画电影将至,《三星堆:未来往事》获颁「龙标」

5 月 3 日消息,据北京国际电影节分享,《三星堆:未来往事》已正式获得国家电影局颁发的「龙标」,标志着国内首部将三星堆文化与 AI 原生技术深度结合的科幻院线电影即将登陆全国大银幕。

据介绍,电影《三星堆:未来往事》以三星堆文化为核心、以 AI 技术为手段,将古蜀文明与科幻叙事相结合,用 AI 技术呈现三星堆文物,构建一个连接过去与未来的科幻世界。

电影《三星堆:未来往事》概念预告片已在第 30 届香港国际影视展上正式亮相。另外,本片的创作脉络可追溯至 2024 年 7 月上线的 AI 科幻短剧集《三星堆 · 未来启示录》第一季,该短剧全网已斩获 1.6 亿播放量。

作为参考,《三星堆:未来启示录》的故事设定在科技飞速发展的近未来。地球古文明遗迹的异变引起全球古文明研究组织的高度关注,泛大西洋人工智能组织 ACE 推测三星堆文物中蕴藏着解决文明危机的关键信息,中国古文明研究组织「西安路 34 号」派出科学家吴星言监督 ACE 组织在中国的行动。四川广汉的江家三代都是三星堆考古工作者,江城联合吴星言展开了一场跨越时空的冒险。(来源:IT 之家)

 

cd Cheatsheet

Basic Syntax

Core command forms for changing directories.

Command Description
cd [DIRECTORY] Change to a directory
cd Change to your home directory
cd -- DIRECTORY Change to a directory whose name may start with -
pwd Print the current working directory

Everyday Navigation

Common ways to move around the filesystem.

Command Description
cd /etc Change to an absolute path
cd Downloads Change to a relative path
cd .. Move up one directory
cd ../.. Move up two directories
cd ./scripts Change to a directory under the current directory

Home Directories

Use shell shortcuts for your home directory and other users’ homes.

Command Description
cd ~ Change to your home directory
cd ~/Downloads Change to Downloads inside your home directory
cd ~username Change to another user’s home directory
cd "$HOME" Change to the directory stored in $HOME

Relative Paths

Build paths from your current directory.

Command Description
cd . Stay in the current directory
cd .. Move to the parent directory
cd ../src Move up one level, then into src
cd ../../var Move up two levels, then into var
cd project/docs Move through nested directories

Previous Directory

Switch between recently used directories.

Command Description
cd - Change to the previous working directory
echo "$OLDPWD" Show the previous working directory
cd "$OLDPWD" Change to the previous directory without using cd -
pushd /path Change directory and save the old one on the stack
popd Return to a directory from the stack

Paths with Spaces

Quote or escape paths that contain spaces or shell metacharacters.

Command Description
cd "Project Files" Quote a directory name with spaces
cd 'Project Files' Use single quotes for a literal path
cd Project\ Files Escape the space with a backslash
cd -- "-reports" Enter a directory whose name starts with -

Symlinks and Physical Paths

Control whether cd follows logical or physical paths.

Command Description
cd -L linkdir Follow symbolic links (default in Bash)
cd -P linkdir Resolve to the physical directory path
pwd Show the shell’s logical current directory
pwd -P Show the physical current directory
cd -P .. Move using the physical directory structure

CDPATH

Search extra base directories when changing by name.

Command Description
export CDPATH=.:~/projects:/opt Search current directory, ~/projects, and /opt
cd myapp Try matching myapp in each CDPATH entry
unset CDPATH Disable CDPATH for the current shell
CDPATH= cd myapp Run one cd command without CDPATH

Troubleshooting

Quick checks for common directory-change errors.

Issue Check
No such file or directory Verify the path with ls -ld path
Permission denied Check execute permission on the directory
Path with spaces fails Quote the path or escape spaces
cd - fails $OLDPWD is not set yet
Unexpected target with CDPATH Run unset CDPATH or use an absolute path
Symlink path looks different Compare pwd and pwd -P

Related Guides

Use these guides for detailed directory navigation workflows.

Guide Description
cd Command in Linux: Change Directories Full cd guide with examples
How to Get the Current Working Directory in Linux Use pwd and understand the current directory
pushd and popd Commands in Linux Work with the directory stack
Linux Commands Cheatsheet General Linux command quick reference

Initial Server Setup on Ubuntu 26.04

A fresh Ubuntu 26.04 server ships with root SSH access, no regular user, and no firewall rules. That works for the first login, but it is not a safe state to leave running on a public VPS.

This guide walks through the first tasks to perform on a new Ubuntu 26.04 server: creating a sudo user, enabling SSH key authentication, locking down SSH, configuring UFW, setting the hostname and timezone, and applying package updates.

Quick Reference

Task Command or file
Log in as root ssh root@server_ip_address
Create a user adduser username
Grant sudo access usermod -aG sudo username
Copy root SSH keys rsync --archive --chown=username:username /root/.ssh /home/username
Add a local key ssh-copy-id username@server_ip_address
SSH hardening file /etc/ssh/sshd_config.d/99-hardening.conf
Test SSH config sudo sshd -t
Allow SSH in UFW sudo ufw allow OpenSSH
Set hostname sudo hostnamectl set-hostname server-name
Set timezone sudo timedatectl set-timezone Europe/Berlin

Prerequisites

Before starting, make sure you have:

  • A new Ubuntu 26.04 server with a public IP address.
  • Root access over SSH, either with a password or a provider-supplied key.
  • A local SSH key pair on your workstation. If you do not have one yet, see how to generate SSH keys on Linux .
  • Access to the provider web console as a backup path in case SSH access stops working.

Keep your original root SSH session open until you have tested the new user login and the hardened SSH configuration.

Log In as Root

Open a terminal on your local machine and connect to the server using the public IP address from your hosting provider:

Terminal
ssh root@server_ip_address

Accept the host key when prompted and enter the root password if password authentication is still enabled. If your provider created the server with an SSH key, the connection should use that key automatically.

Create a New Sudo User

Working as root for daily administration is risky because every command runs with full privileges. Create a regular user account and give it administrative access through the sudo group.

Replace username with the account name you want to use:

Terminal
adduser username

The command prompts for a password and optional user details. Enter a strong password, then press Enter to skip any fields you do not need.

Add the new user to the sudo group:

Terminal
usermod -aG sudo username

The account can now run administrative commands with sudo.

Set Up SSH Key Authentication

SSH keys are safer than password logins and are easier to use once configured. The exact command depends on where your public key is currently stored.

If your public key is already present under the root account, copy the root SSH directory to the new user:

Terminal
rsync --archive --chown=username:username /root/.ssh /home/username

If you need to copy a key from your local workstation, run this command from the local machine:

Terminal
ssh-copy-id username@server_ip_address

Open a new terminal window and test the login before changing the SSH server configuration:

Terminal
ssh username@server_ip_address

The connection should succeed as the new user. Keep both the root session and the new user session open while you continue.

Disable Root Login and Password Authentication

After key-based login works, configure OpenSSH to reject direct root logins and password authentication. Ubuntu includes files from /etc/ssh/sshd_config.d/, which keeps local changes separate from the main SSH configuration file.

Create a hardening snippet:

Terminal
sudo nano /etc/ssh/sshd_config.d/99-hardening.conf

Add the following lines:

/etc/ssh/sshd_config.d/99-hardening.conftxt
PermitRootLogin no
PasswordAuthentication no

Save the file and test the SSH configuration syntax:

Terminal
sudo sshd -t

If the command prints no output, the configuration is valid. Reload SSH to apply the change:

Terminal
sudo systemctl reload ssh

Open another terminal and confirm that you can still log in as the regular user:

Terminal
ssh username@server_ip_address

Do not close your existing sessions until this test succeeds.

Set Up the Firewall with UFW

Ubuntu uses UFW (Uncomplicated Firewall) as a simple front-end for managing host firewall rules. Start by allowing SSH so the firewall does not block your current access:

Terminal
sudo ufw allow OpenSSH

Enable the firewall:

Terminal
sudo ufw enable

Confirm the prompt with y, then check the active rules:

Terminal
sudo ufw status

The output should show that OpenSSH is allowed:

output
Status: active
To Action From
-- ------ ----
OpenSSH ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)

When you install services such as Nginx or Apache, open their profiles before expecting traffic to reach them. For example, an Nginx server that should accept HTTP and HTTPS traffic needs:

Terminal
sudo ufw allow 'Nginx Full'

For more examples, see how to set up a firewall with UFW .

Set the Hostname

A descriptive hostname makes logs, shell prompts, monitoring alerts, and dashboards easier to read. Set the hostname with hostnamectl:

Terminal
sudo hostnamectl set-hostname server-name

Replace server-name with a short name that matches the server role, such as web-01 or db-01.

Check the result:

Terminal
hostnamectl

You can update DNS records or your local SSH config separately if you want to connect by name instead of IP address.

Set the Timezone

Set the server timezone so logs, cron jobs, and timestamps match the region you use for operations:

Terminal
sudo timedatectl set-timezone Europe/Berlin

List available zones if you are unsure of the exact name:

Terminal
timedatectl list-timezones

See how to set or change the timezone on Ubuntu for a deeper explanation.

Update the System

Refresh the package index and install pending updates:

Terminal
sudo apt update
sudo apt upgrade

If the upgrade installed a new kernel or core system libraries, reboot the server:

Terminal
sudo reboot

After the reboot, reconnect as the regular sudo user:

Terminal
ssh username@server_ip_address

Troubleshooting

Locked out after disabling password authentication
Use your provider web console or recovery mode to log in. Edit /etc/ssh/sshd_config.d/99-hardening.conf, temporarily set PasswordAuthentication yes, run sudo sshd -t, reload SSH, and test key login again before disabling passwords.

usermod: group 'sudo' does not exist
Some minimal images may not include the sudo package. Install it with apt install sudo, then rerun usermod -aG sudo username.

sshd -t reports an error
Read the line number in the error message, fix the snippet in /etc/ssh/sshd_config.d/99-hardening.conf, and run sudo sshd -t again. Do not reload SSH until the syntax test passes.

UFW blocks an expected service
Check the active rules with sudo ufw status. Allow the needed service profile or port, such as sudo ufw allow 'Nginx Full' for Nginx web traffic, then test the connection again.

Conclusion

You now have an Ubuntu 26.04 server with a sudo user, key-based SSH access, direct root logins disabled, a basic firewall, and current packages. A good next step is to enable automatic security updates before installing the rest of your stack.

❌