一.Ubuntu简介
Ubuntu Linux是由南非人马克·沙特尔沃思(Mark Shuttleworth)开办的基于Debian Linux的操作体系,于2004年10月公布Ubuntu的第一个版本(Ubuntu 4.10“Warty Warthog”)。Ubuntu实用于笔记本电脑、桌面电脑和服务器,特别是为桌面用户提供尽善尽美的利用体验。Ubuntu几乎包罗了所有常用的应用软件:文字处理、电子邮件、软件开辟工具和Web服务等。用户下载、利用、分享未修改的原版Ubuntu体系,以及到社区获得技术支持,无需付出任何许可费用。
官方网站:企业开源和Linux | Ubuntu
镜像下载地址:https://mirrors.sdu.edu.cn/ubuntu-releases/24.04.1/ubuntu-24.04.1-desktop-amd64.iso
二.Ubuntu的安装详解
选择安装ubuntu
选择语言和键盘
是否毗连到互联网
安装ububtu
选择安装方式
设置账户密码
选择时区
安装前准备确认选择
三.Ubuntu的用户利用
1.Ubuntu用户通例登录方式
在体系中root是无法直接登录的,由于root用户权限过大会导致安全标题
如果需要利用root用户权限可以利用sudo+需要的命令
需要切换root用户
- root@haha:~# vi /etc/pam.d/gdm-password
复制代码
设置root用户密码就可以登录root用户
- root@haha:~# passwd root
- 新的密码:
- 重新输入新的密码:
- passwd:已成功更新密码
复制代码 2.ubuntu用户密码破解
体系默认安装完成后grub启动时间为0,建议改为5s,否则启动太快无法修改参数
- root@haha:~# vim /etc/default/grub
复制代码
- root@haha:~# grub-mkconfig > /boot/grub/grub.cfg
复制代码 当密码忘记时
改为
ctrl+x
设置密码后重新登录root用户即可
四.Ubuntu的软件管理
1.dpkg命令
列出体系中已经安装的软件包信息
- root@haha:~# dpkg -l
- 期望状态=未知(u)/安装(i)/删除(r)/清除(p)/保持(h)
- | 状态=未安装(n)/已安装(i)/仅存配置(c)/仅解压缩(U)/配置失败(F)/不完全安装(H)/触发器等待(W)/触发器未决(T)
- |/ 错误?=(无)/须重装(R) (状态,错误:大写=故障)
- ||/ 名称 版本 体系结构 描述
- +++-=============================================-========================================-============-================================================================================
- ii accountsservice 23.13.9-2ubuntu6 amd64 query and manipulate user account information
- ii acl 2.3.2-1build1 amd64 access control list - utilities
- ii adduser 3.137ubuntu1 all add and remove users and groups
- ii adwaita-icon-theme 46.0-1 all default icon theme of GNOME
- ii alsa-base 1.0.25+dfsg-0ubuntu7 all ALSA driver configuration files
- ii alsa-topology-conf 1.2.5.1-2 all ALSA topology configuration files
- ii alsa-ucm-conf 1.2.10-1ubuntu5 all ALSA Use Case Manager configuration files
- ii alsa-utils 1.2.9-1ubuntu5 amd64 Utilities for configuring and using ALSA
- ii amd64-microcode 3.20231019.1ubuntu2.1 amd64 Processor microcode firmware for AMD CPUs
- ii anacron 2.3-39ubuntu2 amd64 cron-like program that doesn't go by time
- ii apg 2.2.3.dfsg.1-5build3 amd64 Automated Password Generator - Standalone version
- ii apparmor 4.0.1really4.0.0-beta3-0ubuntu0.1 amd64 user-space parser utility for AppArmor
- ii apport 2.28.1-0ubuntu3.1 all automatically generate crash reports for debugging
- ii apport-core-dump-handler 2.28.1-0ubuntu3.1 all Kernel core dump handler for Apport
- ii apport-gtk 2.28.1-0ubuntu3.1 all GTK+ frontend for the apport crash report system
- ii apport-symptoms 0.25 all symptom scripts for apport
- ii appstream 1.0.2-1build6 amd64 Software component metadata management
- ii apt 2.7.14build2 amd64 commandline package manager
- ii apt-config-icons 1.0.2-1build6 all APT configuration snippet to enable icon downloads
- ii apt-config-icons-hidpi 1.0.2-1build6 all APT configuration snippet to enable HiDPI icon downloads
- ii apt-utils 2.7.14build2 amd64 package management related utility programs
- ii aptdaemon 1.1.1+bzr982-0ubuntu44 all transaction based package management service
- ii aptdaemon-data 1.1.1+bzr982-0ubuntu44 all data files for clients
- ii aspell 0.60.8.1-1build1 amd64 GNU Aspell spell-checker
- ii aspell-en 2020.12.07-0-1 all English dictionary for GNU Aspell
- ii at-spi2-common 2.52.0-1build1 all Assistive Technology Service Provider Interface (common files)
- ii at-spi2-core 2.52.0-1build1 amd64 Assistive Technology Service Provider Interface (D-Bus core)
- ii avahi-daemon 0.8-13ubuntu6 amd64 Avahi mDNS/DNS-SD daemon
- ii baobab 46.0-1build1 amd64 GNOME disk usage analyzer
- ii base-files 13ubuntu10.1 amd64 Debian base system miscellaneous files
- ii base-passwd 3.6.3build1 amd64 Debian base system master password and group files
- ii bash 5.2.21-2ubuntu4 amd64 GNU Bourne Again SHell
- ii bash-completion 1:2.11-8 all programmable completion for the bash shell
- ii bc 1.07.1-3ubuntu4 amd64 GNU bc arbitrary precision calculator language
- lines 1-39
复制代码 安装deb包
- root@haha:~# ls
- 公共 模板 视频 图片 文档 下载 音乐 桌面 QQ_3.2.13_241121_amd64_01.deb snap
- root@haha:~# dpkg -i QQ_3.2.13_241121_amd64_01.deb
- 正在选中未选择的软件包 linuxqq。
- (正在读取数据库 ... 系统当前共安装有 155388 个文件和目录。)
- 准备解压 QQ_3.2.13_241121_amd64_01.deb ...
- 正在解压 linuxqq (3.2.13-29927) ...
- 正在设置 linuxqq (3.2.13-29927) ...
- 正在处理用于 hicolor-icon-theme (0.17-2) 的触发器 ...
- 正在处理用于 gnome-menus (3.36.0-1.1ubuntu3) 的触发器 ...
- 正在处理用于 desktop-file-utils (0.27-2build1) 的触发器 ...
复制代码 查看软件包信息
- root@haha:~# dpkg -L linuxqq
- root@haha:~# dpkg -s linuxqq
复制代码 卸载deb软件
- root@haha:~# dpkg -r linuxqq
复制代码 2.管理软件堆栈
- root@haha:~# cd /etc/apt
- root@haha:/etc/apt# ls
- apt.conf.d auth.conf.d keyrings preferences.d preferences.d.save sources.list sources.list.d trusted.gpg.d
- root@haha:/etc/apt#
- root@haha:/etc/apt# vim sources.list
- root@haha:/etc/apt#
复制代码
挂载镜像
- root@haha:~# mkdir /guazai
- root@haha:~# lsblk -p
- NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
- /dev/loop0 7:0 0 4K 1 loop /snap/bare/5
- /dev/loop1 7:1 0 73.9M 1 loop /snap/core22/1663
- /dev/loop2 7:2 0 74.3M 1 loop /snap/core22/1564
- /dev/loop3 7:3 0 10.7M 1 loop /snap/firmware-updater/127
- /dev/loop4 7:4 0 11.1M 1 loop /snap/firmware-updater/147
- /dev/loop5 7:5 0 505.1M 1 loop /snap/gnome-42-2204/176
- /dev/loop6 7:6 0 91.7M 1 loop /snap/gtk-common-themes/1535
- /dev/loop7 7:7 0 269.8M 1 loop /snap/firefox/4793
- /dev/loop8 7:8 0 10.8M 1 loop /snap/snap-store/1244
- /dev/loop9 7:9 0 10.5M 1 loop /snap/snap-store/1173
- /dev/loop10 7:10 0 38.8M 1 loop /snap/snapd/21759
- /dev/loop11 7:11 0 44.3M 1 loop /snap/snapd/23258
- /dev/loop12 7:12 0 500K 1 loop /snap/snapd-desktop-integration/178
- /dev/loop13 7:13 0 568K 1 loop /snap/snapd-desktop-integration/253
- /dev/sda 8:0 0 40G 0 disk
- ├─/dev/sda1 8:1 0 1M 0 part
- └─/dev/sda2 8:2 0 40G 0 part /
- /dev/sr0 11:0 1 5.8G 0 rom /media/root/Ubuntu 24.04.1 LTS amd64
- root@haha:~# mount /dev/sr0 /guazai
- mount: /guazai: WARNING: source write-protected, mounted read-only.
- root@haha:~# lsblk -p
- NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
- /dev/loop0 7:0 0 4K 1 loop /snap/bare/5
- /dev/loop1 7:1 0 73.9M 1 loop /snap/core22/1663
- /dev/loop2 7:2 0 74.3M 1 loop /snap/core22/1564
- /dev/loop3 7:3 0 10.7M 1 loop /snap/firmware-updater/127
- /dev/loop4 7:4 0 11.1M 1 loop /snap/firmware-updater/147
- /dev/loop5 7:5 0 505.1M 1 loop /snap/gnome-42-2204/176
- /dev/loop6 7:6 0 91.7M 1 loop /snap/gtk-common-themes/1535
- /dev/loop7 7:7 0 269.8M 1 loop /snap/firefox/4793
- /dev/loop8 7:8 0 10.8M 1 loop /snap/snap-store/1244
- /dev/loop9 7:9 0 10.5M 1 loop /snap/snap-store/1173
- /dev/loop10 7:10 0 38.8M 1 loop /snap/snapd/21759
- /dev/loop11 7:11 0 44.3M 1 loop /snap/snapd/23258
- /dev/loop12 7:12 0 500K 1 loop /snap/snapd-desktop-integration/178
- /dev/loop13 7:13 0 568K 1 loop /snap/snapd-desktop-integration/253
- /dev/sda 8:0 0 40G 0 disk
- ├─/dev/sda1 8:1 0 1M 0 part
- └─/dev/sda2 8:2 0 40G 0 part /
- /dev/sr0 11:0 1 5.8G 0 rom /guazai
- /media/root/Ubuntu 24.04.1 LTS amd64
- root@haha:~#
复制代码 更新测试
- root@haha:~# apt update
- 获取:1 file:/guazai noble InRelease
- 忽略:1 file:/guazai noble InRelease
- 获取:2 file:/guazai noble Release [1,072 B]
- 获取:2 file:/guazai noble Release [1,072 B]
- 获取:3 file:/guazai noble Release.gpg [833 B]
- 获取:3 file:/guazai noble Release.gpg [833 B]
- 获取:4 file:/guazai noble/main amd64 Packages [53.1 kB]
- 忽略:4 file:/guazai noble/main amd64 Packages
- 获取:5 file:/guazai noble/restricted amd64 Packages [15.2 kB]
- 忽略:5 file:/guazai noble/restricted amd64 Packages
- 获取:4 file:/guazai noble/main amd64 Packages [53.1 kB]
- 获取:5 file:/guazai noble/restricted amd64 Packages [15.2 kB]
- 命中:6 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble InRelease
- 命中:7 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates InRelease
- 命中:8 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-backports InRelease
- 命中:9 http://security.ubuntu.com/ubuntu noble-security InRelease
- 正在读取软件包列表... 完成
- 正在分析软件包的依赖关系树... 完成
- 正在读取状态信息... 完成
- 有 88 个软件包可以升级。请执行 ‘apt list --upgradable’ 来查看它们。
- root@haha:~# apt install -y nginx
- 正在读取软件包列表... 完成
- 正在分析软件包的依赖关系树... 完成
- 正在读取状态信息... 完成
- 将会同时安装下列软件:
- nginx-common
- 建议安装:
- fcgiwrap nginx-doc
- 下列【新】软件包将被安装:
- nginx nginx-common
复制代码 免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。 |