Showing posts with label basshrc in slackware. Show all posts
Showing posts with label basshrc in slackware. Show all posts

Monday, June 20, 2022

Post Slackware Install tips

 After Installing Slackware rather than reboot do these following instead.

0.Before starting the install run the command  network and it will automatically enable the network for you, so if you want to run network install you can do that too.

1. After the installation is finished it will ask you weather you want to shutdown,reboot or  shell and choose the shell option

2. You will be dropped into a shell. chroot in to your install by running 

chroot /mnt

3. Edit /etc/inittab file and change the default runlevel to 4 so that you can login to GUI desktop.

4. Create a local user by running command adduser  

5. The adduser command will take for of setting up your user account.

6. If you feel the need to add your user to extragroups run the command

usermod -aG $GROUP $USER

7a. Edit /etc/default/grub to add the following line

GRUB_DISABLE_OS_PROBER=false 

to allow os-prober to detect your  Windows OS. 

7b. Instead of Lilo you can install Grub as your boot manager in the same chroot run the command

grub-install /dev/sda

grub-mkconfig -o /boot/grub/grub.cfg

then reboot you should now have logged into your GUI desktop. After you have logged in you should first create a local bashrc. Slackware doesn't ships with a bashrc. Here is a sample and a very simple bashrc

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

# Bash version check

if ((BASH_VERSINFO[0] < 4)); then
    echo "This .bashrc file requires at least Bash 4.0"
    exit 1
fi

# Make sure if the history file is deleted...

if [[ ! -f "$HOME/.bash_history" ]]; then
    # Recreate an empty copy so history apps don't show errors
    touch "$HOME/.bash_history"
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).

if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi

# Make sure 256 color terminals are enabled

export TERM=xterm-256color
export use_color=true


PS1="[\D{%d/%m/%Y}-\A] \u@\H-\W:-\$"
PS2="[\D{%d/%m/%Y}-\A] \u@\H-\W:-\$"         

REFERENCE:

https://docs.slackware.com/howtos:slackware_admin:grub_on_first_install 

https://docs.slackware.com/howtos:slackware_admin:installing_with_gpt_without_uefi#grub_2 

                    

Popular Posts