-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathubuntu_cmd.sh
More file actions
executable file
·68 lines (64 loc) · 1.31 KB
/
ubuntu_cmd.sh
File metadata and controls
executable file
·68 lines (64 loc) · 1.31 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
echo "1. 編輯sources.list"
echo "2. 新增使用者"
echo "21. 新增使用者到群組"
echo "3. 新增群組"
echo "4. 將使用者擁有sudo權限"
echo "5. 加入外部軟體來源"
echo "6. tftp conneciton"
echo "7. 更新軟體套件"
echo "8. 系統升級到新版本"
echo "9. apt-cache 搜尋套件"
read option
case "$option" in
"1")
sudo vim /etc/apt/sources.list
;;
"2")
echo "Input the username"
read username
sudo adduser $username
;;
"21")
echo "Input the username"
read username
echo "Input the groupname"
read groupname
sudo adduser $username $groupname
;;
"3")
echo "Input the group name"
read groupname
sudo addgroup $groupname
;;
"4")
sudo vim /etc/sudoers
sudo cat /etc/sudoers
;;
"5")
echo "Input the ppa path"
read ppa_path
sudo add-apt-repository "$ppa_path"
sudo apt-get update
;;
"6")
echo "Input tftp server ip address"
read ip_address
tftp "$ip_address" 69
;;
"7")
sudo apt-get update
sudo apt-get upgrade
;;
"8")
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get upgrade
;;
"9")
echo "Input the package name"
read package_name
apt-cache search "$package_name"
;;
*)
;;
esac