-
Notifications
You must be signed in to change notification settings - Fork 1
/
linux_config.sh
executable file
·50 lines (48 loc) · 1.16 KB
/
linux_config.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
##
## MidKnight PROJECT, 2019
## {MidKnight}projects
## File description:
## linux_config.sh
##
#!bin/bash
green='\e[0;32m'
red='\e[0;31m'
neutral='\e[0;m'
pacman -S nano
clear
echo -e "${red}SET UP LOCALE && TIME\n${neutral}"
echo -e "${green}Uncomment *en_US.UTF-8* or any other locale that you want to use."
sleep 5
nano /etc/locale.gen
locale-gen
read -p "Enter the name of the selected locale: " locale
echo LANG=$locale >> /etc/locale.conf
tzselect
ln -s /usr/share/zoneinfo/Zone/SubZone /etc/localtime
hwclock --systohc --utc
clear
echo -e "${red}LINUX INSTALLATION\n${neutral}"
sleep 6
mv mkinitcpio.conf /etc
pacman -S lvm2
mkinitcpio -p linux
clear
echo -e "${red}GRUB INSTALLATION\n${neutral}"
pacman -S grub
if [ "$input" = "" ]
then
grub-install --target=i386-pc /dev/sda
else
grub-install --target=i386-pc $input
fi
grub-mkconfig -o /boot/grub/grub.cfg
pacman -S iw wpa_supplicant dialog networkmanager
clear
read -p "Enter the name of your machine: " hostname
echo $hostname >> /etc/hostname
echo -e "${green}Enter your root password\n${neutral}"
passwd
clear
echo -e "${green}Please run the exit command, then execute the umount.sh script.\n${neutral}"
sleep 4
exit