Skip to content

sashiprabhaktk/SwiftShell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 SwiftShell: Linux User & Terminal Setup Automator

Transform a fresh Linux installation into a professional development environment in seconds.

SwiftShell is a powerful automation script designed to eliminate the manual work of onboarding new users. With a single command, it creates a secure user account and deploys a fully-loaded terminal environment featuring Zsh, Oh My Zsh, and the stunning Powerlevel10k theme.

SwiftShell Interface
Figure 1: The professional SwiftShell Command-Line Interface.

🌟 Why SwiftShell?

Manually setting up a productive Linux environment can take 20+ minutes. You have to create users, set permissions, install shells, clone themes, and configure plugins. SwiftShell does all of this for you automatically, correctly, and instantly.

🛠️ Key Features

  • 👤 Automated User Management: Creates secure accounts with custom passwords and sudo privileges.
  • 🐚 Professional Shell: Automatically installs Zsh and sets it as the default.
  • 🎨 Instant Aesthetics: Deploys the Powerlevel10k theme for a beautiful, fast terminal UI.
  • 🔌 Poweruser Plugins: Pre-configured with zsh-autosuggestions and zsh-syntax-highlighting.
  • 📝 Audit-Ready Logging: Every action is saved to setup_user.log for troubleshooting.

🚀 Getting Started

1. Who is this for?

  • Beginners: If you are new to Linux and want a "pro" setup without learning 100 commands.
  • Students: A great way to see how shell scripting and automation work.
  • System Admins: A fast way to onboard new users with a consistent environment across servers.

📋 Prerequisites

Before running the script, ensure you have:

  • A Supported Linux System: Works on Ubuntu, Debian, CentOS, RHEL, and Arch Linux.
  • Sudo/Root Access: You must be an administrator on the machine to create new users.
  • Internet Connection: Required to download the theme and plugins.

🏁 Beginner's Quick Start Guide

If you've never used Git or Linux before, follow these exact steps to get started.

1. Open your Terminal

On most Linux systems, you can do this by pressing Ctrl + Alt + T or searching for "Terminal" in your applications menu.

2. Download the Repository

Copy and paste this command into your terminal and press Enter. This will download ("clone") all the files to your computer.

git clone https://github.com/sashiprabhaktk/SwiftShell.git

If you see an error saying "command 'git' not found", run sudo apt update && sudo apt install git -y first.

3. Move to the Project Folder

Now, you need to tell the terminal to go into the folder you just downloaded:

cd SwiftShell

4. Run the Tool

First, give the script permission to run, then start it with sudo:

chmod +x setup_user.sh
sudo ./setup_user.sh

🔑 Important Note on Passwords: When you run the command above or when the script asks for a password, you will NOT see any characters (no stars or dots) as you type. This is a security feature of Linux. Just type your password and hit Enter.

5. Follow the On-Screen Steps

The script will now guide you through:

  1. Choosing a Username: (e.g., linux_ninja)
  2. Setting a Password: (Type it once, then once more to confirm)
  3. Admin Rights: Type y if you want the new user to be an administrator.

6. Style Your Terminal (The Wizard)

Once the script creates your user, it will automatically log you into your new account. Because this is your first time using this environment, you will see the Powerlevel10k Configuration Wizard.

It will ask you several questions about how you want your terminal to look, such as:

Does this look like a diamond (rotated square)? (y/n/q)

Don't worry—these prompts are perfectly normal! This is where you get to customize the theme and appearance exactly as you like. Simply follow the prompts by typing y for Yes or n for No based on the icons you see on your screen.

Powerlevel10k Configuration
Figure 2: Personalizing your terminal appearance with the Powerlevel10k setup wizard.

That's it! SwiftShell does the heavy lifting, and once you complete the short wizard, your new professional terminal environment will be fully set up and ready to use.

Shift User
Figure 3: SwiftShell successfully switching to the new user environment.


📝 Logging and Debugging

If something feels wrong, SwiftShell creates a file called setup_user.log in the same directory.

How to view the logs:

  • See the whole file: cat setup_user.log
  • Watch it in real-time: tail -f setup_user.log

Real-time Logging
Figure 4: Real-time Logging.


🚑 Error Handling & Recovery

How to "Reset" or Remove a User

If you want to delete the user you just created and start over, run these commands:

  1. Delete the user and their files:

    sudo deluser --remove-home <username>
  2. Clean up any remaining Zsh folders (if necessary):

    sudo rm -rf /home/<username>/.oh-my-zsh
    sudo rm -rf /home/<username>/.zshrc

🛡️ Security Notes

  • Why Sudo?: Creating a user is a "system-level" change. Only administrators are allowed to do this.
  • Best Practice: Always review scripts before running them with sudo permissions. You can read the code in setup_user.sh to see every command it runs.

❓ FAQ Section

Q: Why is my terminal asking me formatting questions on first login? A: That is the Powerlevel10k wizard. It’s asking how you want your terminal to look (colors, icons, etc.). Just follow the icons it shows!

Q: My password isn't appearing when I type! A: This is normal in Linux. The computer is recording your typing, but it hides the input to prevent people from seeing your password length.


✨ Conclusion

SwiftShell is built to save you time and make the Linux terminal experience enjoyable from day one. By using this tool, you ensure every user you create has a professional, high-speed, and helpful environment.

Happy Scripting! 🚀

About

An all-in-one Linux automation tool to create new users and automatically set up a modern terminal experience with Oh My Zsh, themes, and autosuggestions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages