A simple Ubuntu setup script to streamline the initial configuration of a new system.
To run the script, use the following command:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/RBN-Apps/ubuntu-setup/main/setup.sh)"
The script automates the following tasks:
-
Backup Existing Configuration:
- Creates a backup of the
~/.bashrc
file as~/.bashrc.backup
to ensure existing configurations are preserved.
- Creates a backup of the
-
Enable Color Support in Bash Prompt:
- Activates color support in the Bash prompt by modifying the
.bashrc
file.
- Activates color support in the Bash prompt by modifying the
-
Add Tmux Aliases:
- Appends the following convenient
tmux
aliases to~/.bashrc
:alias t='tmux'
- Shortcut for launchingtmux
.alias ta='tmux attach -t'
- Attach to an existingtmux
session.alias tn='tmux new -s'
- Start a newtmux
session with a specific name.alias tls='tmux ls'
- List alltmux
sessions.alias tk='tmux kill-session -t'
- Kill a specifictmux
session.
- Appends the following convenient
-
Apply Bash Changes:
- Reloads the
.bashrc
to immediately apply the changes.
- Reloads the
-
System Update and Upgrade:
- Updates the system's package list and installs the latest versions of all packages.
-
Install Neofetch:
- Installs
neofetch
, a tool for displaying system information in the terminal.
- Installs
-
Optional New User Creation:
- Prompts for a username and password to create a new user account.
- Adds the new user to the
sudo
group (optional). - Copies the modified
.bashrc
to the new user's home directory to maintain consistency in configuration. - Applies the appropriate ownership for the
.bashrc
file in the new user's directory.
-
Summary:
- Displays a confirmation message summarizing the performed actions:
- Whether a new user was created.
- Inclusion of
tmux
aliases and color support in.bashrc
. - System update and
neofetch
installation.
- Displays a confirmation message summarizing the performed actions: