sebae banner ad-300x250
sebae intro coupon 30 off
sebae banner 728x900
sebae banner 300x250

This Bash Trick Makes cd Much More Useful!

0 views
0%

This Bash Trick Makes cd Much More Useful!

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.

*❤️ Consider becoming a Channel Member*
Support Linux Learning and gain acess to exclusive perks, such as ad-free content and early access to select videos. Your support really helps!!!
Join here ➜ https://learnlinux.link/member

*🛍️ Support The Channel and Get Awesome Linux Swag!*
Head on over to the Learn Linux TV Merch Shop and check out some great Linux-themed gear, including (but not limited to) T-shirts, drinkware, buttons, stickers and more!
• "apt install coffee" T-Shirt ➜ https://learnlinux.link/apt-install-coffee
• "sudo" T-Shirt ➜ https://learnlinux.link/sudo-shirt
• Linux Commands Cheat Sheet ➜ https://learnlinux.link/linux-commands
• "May Spontaneously Talk About Linux" T-Shirt ➜ https://learnlinux.link/talk-about-linux-shirt
• "Dark Side of the Terminal" T-Shirt ➜ https://learnlinux.link/dark-side-shirt
• Lots more ➜ https://merch.learnlinux.tv
_Use coupon code "LINUXFAN" to get 10% off your entire order ➜ https://merch.learnlinux.tv_

*🐧 Other Ways to Support Learn Linux TV*
• Channel Membership ➜ https://learnlinux.link/member
• Patreon ➜ https://learnlinux.link/patron
• Spin up your very own Linux server ➜ https://learnlinux.link/digitalocean
• Linux swag ➜ https://merch.learnlinux.tv
• Check out Netdata ➜ https://learnlinux.link/netdata
• Jay’s Gear ➜ https://learnlinux.link/amazon
_Note: Royalties and/or commission is earned from each of the above links_

*🌐 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*
• 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
• Ansible (Udemy) ➜ https://learnlinux.link/ansible
• Linux Essentials (Udemy) ➜ https://learnlinux.link/linux-essentials

*🎓 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

⚠️ 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

Date: January 13, 2026