А знаете ли вы, что в Bash есть особая переменная "$_" ? Из описания можно узнать, что в переменную "$_" помещается последний аргумент последней команды.
Что-то знакомое? Конечно, в Python есть примерно тоже самое.
Мы знаем, что дата первого релиза Bash (8 июня 1989) несколько раньше чем первый релиз Python (20 февраля 1991). Если учесть, что по задумке автора Python это агрегация самых успешных практик отовсюду, можно ли сказать что именно эта фишка к нему пришла из Bash? Ни подтверждения ни опровержения я пока не нашел.
Давайте просто считать это совпадением 😉
А как это может быть полезно в Bash?
Приведу простой пример, который оценят те, кто часто работает в терминале.
Допустим, нам надо создать директорию и зайти в неё. Что обычно делаем?
:~$ mkdir foldername
:~$ cd foldername
:~/foldername$
Как это сделать в одну команду?
:~$ mkdir foldername && cd foldername
:~/foldername$
Уже лучше, но хочется короче, без повторов. Вот тут и пригодится наша переменная. Напомню, что в неё сохраняется последний аргумент предыдущей команды.
:~$ mkdir foldername && cd $_
:~/foldername$
_________________
PS.
Символы "&&"" разделяют команды и означают, что требуется выполнить вторую команду только если первая завершилась успешно.
#linux#tricks
📦 Прохождение Linux-машины средней сложности SANDWORM HackTheBox.
• Sandworm — это машина средней сложности на #Linux, которая содержит веб-приложение с сервисом проверки PGP, уязвимым к инъекции шаблонов на стороне сервера (SSTI), что приводит к выполнению удалённого кода (RCE) внутри изоляции Firejail. В этой изоляции можно обнаружить текстовые учетные данные, позволяющие получить доступ по SSH к машине от имени одного из пользователей.
• Далее обнаруживается cron-задача, которая компилирует и запускает бинарник на Rust. Программа использует настраиваемый внешний модуль логирования, к которому у пользователя есть доступ на запись, что затем используется для получения шелл от имени пользователя atlas, запускающего cron-задачу. Наконец, используется недавний эксплойт Firejail (CVE-2022-31214) для создания песочницы, в которой атакующий может выполнить команду su и получить оболочку root на целевой системе.
➡️https://youtu.be/NpzTEVfUo_U
#Пентест#CTF
📰 Linux Foundation Launches Open Driver Initiative to Strengthen Hardware Support Across Linux
by George WhittakerThe Linux Foundation has announced a new Open Driver Initiative, a collaborative effort aimed at improving the development, maintenance, and long-term sustainability of open-source hardware drivers across the Linux ecosystem.The initiative reflects growing demand for better hardware compatibility in areas ranging from desktops and gaming systems to cloud infrastructure, automotive platforms, AI hardware, and next-generation...
🔗 Source: https://www.linuxjournal.com/content/linux-foundation-launches-open-driver-initiative-strengthen-hardware-support-across-linux
#linux#opensource
📰 Shotcut 26.4 Video Editor Adds Vulkan GPU to Speech to Text on Linux
Shotcut 26.4 open-source video editor is now available for download with Vulkan GPU support for Speech to Text on Linux, 10-bit VP9 MP4 (E-AC-3) and 10-bit VP9 WebM (Opus) export presets, and more.
🔗 Source: https://9to5linux.com/shotcut-26-4-video-editor-adds-vulkan-gpu-to-speech-to-text-on-linux
#linux#opensource
📰 The ps5-linux project can turn some PlayStation 5 consoles into a Linux gaming machine
The open source ps5-linux project has been released, allowing you to turn a PlayStation 5 into a fully fledged Linux gaming machine.Read the full article on GamingOnLinux.
🔗 Source: https://www.gamingonlinux.com/2026/04/the-ps5-linux-project-can-turn-some-playstation-5-consoles-into-a-linux-gaming-machine/
#linux#opensource
📰 Thunderbird 150 Lands on Linux: Smarter Encryption, Better Tools, and a Polished Experience
by George WhittakerMozilla has officially rolled out Thunderbird 150.0, the latest version of its open-source email client, bringing a mix of security-focused enhancements, usability upgrades, and workflow improvements for Linux and other platforms. Released in April 2026, this update continues Thunderbird’s steady evolution as a powerful desktop email solution.
🔗 Source: https://www.linuxjournal.com/content/thunderbird-150-lands-linux-smarter-encryption-better-tools-and-polished-experience
#linux#opensource
📰Linux GPU tool (LACT) gets a new UI and a NVIDIA Voltage-Frequency Curve Editor
The popular open source app, Linux GPU Configuration And Monitoring Tool (LACT), has a huge new release out now with a brand new UI and major new features.Read the full article on GamingOnLinux.
🔗 Source: https://www.gamingonlinux.com/2026/04/linux-gpu-tool-lact-gets-a-new-ui-and-a-nvidia-voltage-frequency-curve-editor/
#linux#opensource
📰 HDMI FRL Support Achieved With Open-Source Nouveau For NVIDIA GPUs
While the AMDGPU open-source driver has struggled with HDMI 2.1 support due to the HDMI Forum blocking open-source implementations, HDMI Fixed Rate Link (FRL) as a feature of the HDMI 2.1 specification is enjoying success now with the open-source Nouveau graphics driver on Linux for NVIDIA GPUs...
🔗 Source: https://www.phoronix.com/news/HDMI-FRL-On-Nouveau-Linux
#linux#opensource
📰 Linux may get a hall pass from one state age-check bill, but Congress plays hall monitor
Colorado amendments could exempt open source OSes, code repos, and containers The prospect of OS-level age checks applying to open source systems is a serious concern for FOSS advocates. Campaigners appear to have secured proposed exemptions for open source operating systems, code repositories, and containers in one US state, but stricter federal legislation has already been introduced in Congress.…
🔗 Source: https://go.theregister.com/feed/www.theregister.com/2026/04/22/linux_us_state_age_verificaiton_laws/
#linux#opensource
📰 CoolerControl 4.2 adds auto detection of new devices, stress-testing and more
The open-source app for monitoring and controlling supported cooling devices on Linux, CoolerControl, has a big new release out with major new features.Read the full article on GamingOnLinux.
🔗 Source: https://www.gamingonlinux.com/2026/04/coolercontrol-4-2-adds-auto-detection-of-new-devices-stress-testing-and-more/
#linux#opensource
📰 Fake Linux leader using Slack to con devs into giving up their secrets
Google Sites lure leads to bogus root certificate Imagine getting asked to do something by a person in authority. An unknown malware slinger targeting open source software developers via Slack impersonated a real Linux Foundation official and used pages hosted on Google.com to steal developers' credentials and take over their systems.…
🔗 Source: https://go.theregister.com/feed/www.theregister.com/2026/04/13/linux_foundation_social_engineering/
#linux#opensource
📰Mainline video capture and camera support for Rockchip RK3588
After over five years of development and collaboration across the Open Source community, mainline Linux support for Rockchip RK3588's video capture hardware has finally landed.
🔗 Source: https://www.collabora.com/news-and-blog/news-and-events/mainline-video-capture-and-camera-support-for-rockchip-rk3588.html
#linux#opensource