How to Change a User’s Default Shell in Linux

How to Change a User’s Default Shell in Linux

Written By
i
iDoLinux
Jun 10, 2025

Managing user environments is an essential part of Linux system administration. One powerful way to personalize or restrict user sessions is by changing the default login shell. In this article, we’ll walk through two ways to do that using the usermod and chsh commands. If you’re unfamiliar with directory management, check out our guide on creating and removing directories before diving into more advanced user management.

This guide also complements other essential tutorials, such as opening files from the terminal, installing the latest kernel on Ubuntu, or counting string occurrences in files. And if you’re a ViM user, make sure to explore our ViM split screen trick for an optimized terminal experience. For a deeper understanding of how shells interact with your Linux session, visit our introduction to the shell environment.

i

iDoLinux

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.