Summary
Keywords
Full Transcript
Did you know you can make Bash automatically run ls every time you use cd? In this video, I show a simple but powerful Bash trick that improves your Linux command-line workflow by automatically listing files whenever you change directories. We start by creating a custom cd function in Bash, then I walk through exactly how it works so you understand what’s happening behind the scenes. This approach helps you learn more about Bash functions, shell behavior, and how to customize your terminal in a practical, real-world way. Once you’ve set this up, navigating directories becomes faster and more informative, especially when working in complex file structures. As a bonus, I also demonstrate how to create a reusable extract function that can automatically unpack many common archive formats from the command line, saving you even more time. If you’re looking for useful Bash tips, want to customize your Linux terminal, or enjoy learning small tricks that improve productivity, this video is for you. *📖 Switch to Linux with my latest book!* Linux is one of the best decisions you can make for your computer — but knowing where to start is the hard part. This guide walks you through everything: choosing a distribution, installing it, and using it confidently every day. It'll be released very soon! 📌 *Join the announcement list here ➜ https://leanpub.com/switch-to-linux* *🔥 Top Recommendations* • Get $100 Credit to Practice on Akamai (Linode) ➜ https://learnlinux.link/linode • Linux Commands Cheat Sheet ➜ https://learnlinux.link/linux-commands • 30% Off Linux Foundation Certifications (Use code "LEARNLINUXTV") ➜ https://learnlinux.link/lf • Professional tutoring from yours truly ➜ https://learnlinux.link/tutor-me *🛠️ SysAdmin Tools* • Monitor your Infrastructure like a Pro with Netdata ➜ https://learnlinux.link/netdata • Check out TinyPilot, a Pi-Based Remote Access Solution ➜ https://learnlinux.link/tinypilot • Tips for Switching to Linux (ebook) ➜ https://learnlinux.link/linux-desktop-tips *🛡️ Privacy & Privacy* • Safeguard your Internet activity with Proton VPN (70% off) ➜ https://go.getproton.me/aff_c?offer_id=26&aff_id=16836 • Get Proton end-to-end Encrypted Email for $1/month ➜ https://go.getproton.me/aff_c?offer_id=7&aff_id=16836 *❤️ Support the Channel* • Enjoyed the video? Your support keeps this channel independent! • Become a Channel Member (Ad-Free & Early Access) ➜ https://learnlinux.link/join • Support on Patreon ➜ https://learnlinux.link/patron *🛍️ Featured Merch* • "apt install coffee" T-Shirt (My personal favorite) ➜ https://learnlinux.link/apt-install-coffee • Proxmox T-Shirt ➜ https://learnlinux.link/proxmox-shirt • Explore the Full Shop ➜ https://merch.learnlinux.tv *🌐 Video-specific Links* • "cd" Function code ➜ https://learnlinux.link/cd-function • "extract" Function code ➜ https://learnlinux.link/extract-function *🕐 Time Codes* 00:00 – Bash Trick: Auto-ls When Changing Directories 01:25 – Override cd with a Custom Bash Function 05:20 – Support Learn Linux TV and grab some Linux Swag 06:45 – Bonus: Create an extract Function in Bash *🎓 Full Linux Courses* • Getting Started with Ansible ➜ https://learnlinux.link/ansible • Linux Essentials Certification Guide ➜ https://learnlinux.link/linux-essentials • Linux Crash Course ➜ https://linux.video/cc • tmux ➜ https://linux.video/tmux • vim ➜ https://linux.video/vim • Bash Scripting ➜ https://linux.video/bash • Proxmox VE ➜ https://linux.video/pve *🎓 More About Learn Linux TV* • Main site ➜ https://www.learnlinux.tv • Community Forums ➜ https://community.learnlinux.tv • Github Account ➜ https://github.com/LearnLinuxTV • Content Ethics ➜ https://www.learnlinux.tv/content-ethics • Request Paid Assistance ➜ https://www.learnlinux.tv/request-assistance _Note: Some links mentioned here are affiliate links. If you purchase through them, it helps support Learn Linux TV at no additional cost to you._ ⚠️ Use Content Responsibly Learn Linux TV shares technical content intended to teach and help you, but it comes with no warranty. The channel is not liable for any damages from its use. Always ensure you have proper permissions, follow company policies, and comply with all applicable laws while working with infrastructure. #Linux #commandline #linuxterminal
