mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-02-06 23:50:16 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
b75bd04e94
90
sources/news/20201027 Fedora 33 is officially here.md
Normal file
90
sources/news/20201027 Fedora 33 is officially here.md
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: ( )
|
||||||
|
[#]: reviewer: ( )
|
||||||
|
[#]: publisher: ( )
|
||||||
|
[#]: url: ( )
|
||||||
|
[#]: subject: (Fedora 33 is officially here!)
|
||||||
|
[#]: via: (https://fedoramagazine.org/announcing-fedora-33/)
|
||||||
|
[#]: author: (Matthew Miller https://fedoramagazine.org/author/mattdm/)
|
||||||
|
|
||||||
|
Fedora 33 is officially here!
|
||||||
|
======
|
||||||
|
|
||||||
|
![][1]
|
||||||
|
|
||||||
|
Today, I’m excited to share the results of the hard work of thousands of contributors to the Fedora Project: our latest release, Fedora 33, is here! This is a big release with a lot of change, but I believe all that work will also make it a comfortable one, fulfilling our goal of bringing you the latest stable, powerful, and robust free and open source software in many easy to use offerings.
|
||||||
|
|
||||||
|
If you just want to get to the bits without delay, head over to <https://getfedora.org/> right now. For details, read on!
|
||||||
|
|
||||||
|
### **Find the Fedora flavor that’s right for you!**
|
||||||
|
|
||||||
|
Fedora Editions are targeted outputs geared toward specific “showcase” uses on the desktop, in server and cloud environments—and now for Internet of Things as well.
|
||||||
|
|
||||||
|
Fedora Workstation focuses on the desktop, and in particular, it’s geared toward software developers who want a “just works” Linux operating system experience. This release features [GNOME 3.38][2], which has plenty of great improvements as usual. The addition of the Tour application helps new users learn their way around. And like all of our other desktop-oriented variants, Fedora Workstation now uses [BTRFS as the default filesystem][3]. This advanced filesystem lays the foundation for bringing a lot of great enhancements in upcoming releases. For your visual enjoyment, Fedora 33 Workstation now features an animated background (based on time of day) by default.
|
||||||
|
|
||||||
|
Fedora CoreOS is an emerging Fedora Edition. It’s an automatically-updating, minimal operating system for running containerized workloads securely and at scale. It offers several [update streams][4] that can be followed for automatic updates that occur roughly every two weeks. Currently the **next** stream is based on Fedora 33, with the **testing** and **stable** streams to follow. You can find information about released artifacts that follow the **next** stream from [the download page][5] and information about how to use those artifacts in the [Fedora CoreOS Documentation][6].
|
||||||
|
|
||||||
|
[Fedora IoT][7], newly promoted to Edition status, provides a strong foundation for IoT ecosystems and edge computing use cases. Among many other features, Fedora 33 IoT introduces the Platform AbstRaction for SECurity (PARSEC), an open-source initiative to provide a common API to hardware security and cryptographic services in a platform-agnostic way.
|
||||||
|
|
||||||
|
Of course, we produce more than just the Editions. [Fedora Spins][8] and [Labs][9] target a variety of audiences and use cases, including [Fedora CompNeuro][10], which brings a plethora of open source computational modelling tools for neuroscience, and desktop environments like [KDE Plasma][11] and [Xfce][12].
|
||||||
|
|
||||||
|
And, don’t forget our alternate architectures: [ARM AArch64, Power, and S390x][13]. New in Fedora 33, AArch64 users can use the .NET Core language for cross-platform development. We have improved support for Pine64 devices, NVidia Jetson 64 bit platforms, and the Rockchip system-on-a-chip devices including the Rock960, RockPro64, and Rock64. (However, a late-breaking note: there may be problems booting on some of these devices. Upgrading from existing Fedora 32 will be fine. More info will be on the [Common Bugs][14] page as we have it.)
|
||||||
|
|
||||||
|
We’re also excited to announce that the Fedora Cloud Base Image and Fedora CoreOS will be available in Amazon’s [AWS Marketplace][15] for the first time with Fedora 33. Fedora cloud images have been available in the Amazon cloud for over a decade, and you can launch our official images by AMI ID or [with a click][16]. The Marketplace provides an alternate way to get the same thing, with significantly wider visibility for Fedora. This will also make our cloud images available in new AWS regions more quickly. Thank you especially to David Duncan for making this happen!
|
||||||
|
|
||||||
|
### General improvements
|
||||||
|
|
||||||
|
No matter what variant of Fedora you use, you’re getting the latest the open source world has to offer. Following our “[First][17]” foundation, we’ve updated key programming language and system library packages, including Python 3.9, Ruby on Rails 6.0, and Perl 5.32. In Fedora KDE, we’ve followed the work in Fedora 32 Workstation and enabled the EarlyOOM service by default to improve the user experience in low-memory situations.
|
||||||
|
|
||||||
|
To make the default Fedora experience better, we’ve set nano as the default editor. nano is a friendly editor for new users. Those of you who want the power of editors like vi can, of course, set your own default.
|
||||||
|
|
||||||
|
We’re excited for you to try out the new release! Go to <https://getfedora.org/> and download it now. Or if you’re already running a Fedora operating system, follow the easy [upgrade instructions][18]. For more information on the new features in Fedora 33, see the [release notes][19].
|
||||||
|
|
||||||
|
### **A note on Secure Boot**
|
||||||
|
|
||||||
|
Secure Boot is a security standard which ensures that only officially-signed operating system software can load on your computer. This is important for preventing persistent malware which could hide itself in your computer’s firmware and survive even an operating system reinstallation. However, in the wake of the [Boot Hole][20] vulnerability, the cryptographic certificate used to sign Fedora bootloader software will be revoked and replaced with a new one. Because this will have a broad impact, revocation should not happen widely until the second quarter of 2021 or later.
|
||||||
|
|
||||||
|
However, some users may have received this revocation from other operating systems or firmware updates already. In that case, Fedora installations will not boot with Secure Boot enabled. To be clear, this will not affect most users. If it does affect you, you can boot with Secure Boot disabled for the time being. We will release an update signed with the new certificate to be available on all supported releases well before broad-scale certificate revocation takes place, and at that point Secure Boot should be reenabled.
|
||||||
|
|
||||||
|
### **In the unlikely event of a problem….**
|
||||||
|
|
||||||
|
If you run into a problem, check out the [Fedora 33 Common Bugs][14] page, and if you have questions, visit our [Ask Fedora][21] user-support platform.
|
||||||
|
|
||||||
|
### **Thank you everyone**
|
||||||
|
|
||||||
|
Thanks to the thousands of people who contributed to the Fedora Project in this release cycle, and especially to those of you who worked extra hard to make this another on-time release during a pandemic. Fedora is a community, and it’s great to see how much we’ve supported each other.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://fedoramagazine.org/announcing-fedora-33/
|
||||||
|
|
||||||
|
作者:[Matthew Miller][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[译者ID](https://github.com/译者ID)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://fedoramagazine.org/author/mattdm/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://fedoramagazine.org/wp-content/uploads/2020/10/f33-final-816x345.jpg
|
||||||
|
[2]: https://www.gnome.org/news/2020/09/gnome-3-38-released/
|
||||||
|
[3]: https://fedoramagazine.org/btrfs-coming-to-fedora-33/
|
||||||
|
[4]: https://docs.fedoraproject.org/en-US/fedora-coreos/update-streams/
|
||||||
|
[5]: https://getfedora.org/en/coreos/download?stream=next
|
||||||
|
[6]: https://docs.fedoraproject.org/en-US/fedora-coreos/getting-started/
|
||||||
|
[7]: https://getfedora.org/iot
|
||||||
|
[8]: https://spins.fedoraproject.org/
|
||||||
|
[9]: https://labs.fedoraproject.org/
|
||||||
|
[10]: https://labs.fedoraproject.org/en/comp-neuro/
|
||||||
|
[11]: https://spins.fedoraproject.org/en/kde/
|
||||||
|
[12]: https://spins.fedoraproject.org/en/xfce/
|
||||||
|
[13]: https://alt.fedoraproject.org/alt/
|
||||||
|
[14]: https://fedoraproject.org/wiki/Common_F33_bugs
|
||||||
|
[15]: https://aws.amazon.com/marketplace
|
||||||
|
[16]: https://getfedora.org/en/coreos/download?tab=cloud_launchable&stream=stable
|
||||||
|
[17]: https://docs.fedoraproject.org/en-US/project/#_first
|
||||||
|
[18]: https://docs.fedoraproject.org/en-US/quick-docs/upgrading/
|
||||||
|
[19]: https://docs.fedoraproject.org/en-US/fedora/f33/release-notes/
|
||||||
|
[20]: https://access.redhat.com/security/vulnerabilities/grub2bootloader
|
||||||
|
[21]: http://ask.fedoraproject.org
|
@ -1,173 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: (robsean)
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (How to Free Up Space in /boot Partition on Ubuntu Linux?)
|
|
||||||
[#]: via: (https://itsfoss.com/free-boot-partition-ubuntu/)
|
|
||||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
|
||||||
|
|
||||||
How to Free Up Space in /boot Partition on Ubuntu Linux?
|
|
||||||
======
|
|
||||||
|
|
||||||
The other day, I got a warning that boot partition is almost full or has no space left. Yes, I have a separate boot partition, not many people do that these days, I believe.
|
|
||||||
|
|
||||||
This was the first time I saw such an error and it left me confused. Now, there are several [ways to free up space on Ubuntu][1] (or Ubuntu-based distros) but not all of them are useful in this case.
|
|
||||||
|
|
||||||
This is why I decided to write about the steps I followed to free some space in the /boot partition.
|
|
||||||
|
|
||||||
### Free up space in /boot partition on Ubuntu (if your boot partition is running out of space)
|
|
||||||
|
|
||||||
![][2]
|
|
||||||
|
|
||||||
I’d advise you to carefully read through the solutions and follow the one best suited for your situation. It’s easy but you need to be cautious about performing some of these on your production systems.
|
|
||||||
|
|
||||||
#### Method 1: Using apt autoremove
|
|
||||||
|
|
||||||
You don’t have to be a terminal expert to do this, it’s just one command and you will be removing unused kernels to free up space in the /boot partition.
|
|
||||||
|
|
||||||
All you have to do is, type in:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo apt autoremove
|
|
||||||
```
|
|
||||||
|
|
||||||
This will not just remove unused kernels but also get rid of the dependencies that you don’t need or isn’t needed by any of the tools installed.
|
|
||||||
|
|
||||||
Once you enter the command, it will list the things that will be removed and you just have to confirm the action. If you’re curious, you can go through it carefully and see what it actually removes.
|
|
||||||
|
|
||||||
Here’s how it will look like:
|
|
||||||
|
|
||||||
![][3]
|
|
||||||
|
|
||||||
You have to press **Y** to proceed.
|
|
||||||
|
|
||||||
_**It’s worth noting that this method will only work if you’ve a tiny bit of space left and you get the warning. But, if your /boot partition is full, APT may not even work.**_
|
|
||||||
|
|
||||||
In the next method, I’ll highlight two different ways by which you can remove old kernels to free up space using a GUI and also the terminal.
|
|
||||||
|
|
||||||
#### Method 2: Remove Unused Kernel Manually (if apt autoremove didn’t work)
|
|
||||||
|
|
||||||
Before you try to [remove any older kernels][4] to free up space, you need to identify the current active kernel and make sure that you don’t delete that.
|
|
||||||
|
|
||||||
To [check your kernel version][5], type in the following command in the terminal:
|
|
||||||
|
|
||||||
```
|
|
||||||
uname -r
|
|
||||||
```
|
|
||||||
|
|
||||||
The [uname command is generally used to get Linux system information][6]. Here, this command displays the current Linux kernel being used. It should look like this:
|
|
||||||
|
|
||||||
![][7]
|
|
||||||
|
|
||||||
Now, that you know what your current Linux Kernel is, you just have to remove the ones that do not match this version. You should note it down somewhere so that you ensure you do not remove it accidentally.
|
|
||||||
|
|
||||||
Next, to remove it, you can either utilize the terminal or the GUI.
|
|
||||||
|
|
||||||
Warning!
|
|
||||||
|
|
||||||
Be extra careful while deleting kernels. Identify and delete old kernels only, not the current one you are using otherwise you’ll have a broken system.
|
|
||||||
|
|
||||||
##### Using a GUI tool to remove old Linux kernels
|
|
||||||
|
|
||||||
You can use the [Synaptic Package Manager][8] or a tool like [Stacer][9] to get started. Personally, when I encountered a full /boot partition with apt broken, I used [Stacer][6] to get rid of older kernels. So, let me show you how that looks.
|
|
||||||
|
|
||||||
First, you need to launch “**Stacer**” and then navigate your way to the package uninstaller as shown in the screenshot below.
|
|
||||||
|
|
||||||
![][10]
|
|
||||||
|
|
||||||
Here, search for “**image**” and you will find the images for the Linux Kernels you have. You just have to delete the old kernel versions and not your current kernel image.
|
|
||||||
|
|
||||||
I’ve pointed out my current kernel and old kernels in my case in the screenshot above, so you have to be careful with your kernel version on your system.
|
|
||||||
|
|
||||||
You don’t have to delete anything else, just the ones that are the older kernel versions.
|
|
||||||
|
|
||||||
Similarly, just search for “**headers**” in the list of packages and delete the old ones as shown below.
|
|
||||||
|
|
||||||
![][11]
|
|
||||||
|
|
||||||
Just to warn you, you **don’t want to remove “linux-headers-generic”**. Only focus on the ones that have version numbers with them.
|
|
||||||
|
|
||||||
And, that’s it, you’ll be done and apt will be working again and you have successfully freed up some space from your /boot partition. Similarly, you can do this using any other package manager you’re comfortable with.
|
|
||||||
|
|
||||||
#### Using the command-line to remove old kernels
|
|
||||||
|
|
||||||
It’s the same thing but just using the terminal. So, if you don’t have the option to use a GUI (if it’s a remote machine/server) or if you’re just comfortable with the terminal, you can follow the steps below.
|
|
||||||
|
|
||||||
First, list all your kernels installed using the command below:
|
|
||||||
|
|
||||||
```
|
|
||||||
ls -l /boot
|
|
||||||
```
|
|
||||||
|
|
||||||
It should look something like this:
|
|
||||||
|
|
||||||
![][12]
|
|
||||||
|
|
||||||
The ones that are mentioned as “**old**” or the ones that do not match your current kernel version are the unused kernels that you can delete.
|
|
||||||
|
|
||||||
Now, you can use the **rm** command to remove the specific kernels from the boot partition using the command below (a single command for each):
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo rm /boot/vmlinuz-5.4.0-7634-generic
|
|
||||||
```
|
|
||||||
|
|
||||||
Make sure to check the version for your system — it may be different for your system.
|
|
||||||
|
|
||||||
If you have a lot of unused kernels, this will take time. So, you can also get rid of multiple kernels using the following command:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo rm /boot/*-5.4.0-{7634}-*
|
|
||||||
```
|
|
||||||
|
|
||||||
To clarify, you need to write the last part/code of the Kernel versions separated by commas to delete them all at once.
|
|
||||||
|
|
||||||
Suppose, I have two old kernels 5.4.0-7634-generic and 5.4.0-7624, the command will be:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo rm /boot/*-5.4.0-{7634,7624}-*
|
|
||||||
```
|
|
||||||
|
|
||||||
If you don’t want to see the old kernel version in the grub boot menu, you can simply [update grub][13] using the following command:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo update-grub
|
|
||||||
```
|
|
||||||
|
|
||||||
That’s it. You’re done. You’ve freed up space and also potentially fixed the broken APT if it was an issue after your /boot partition filled up.
|
|
||||||
|
|
||||||
In some cases, you may need to enter these commands to fix the broken apt (as I’ve noticed in the forums):
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo dpkg --configure -a
|
|
||||||
sudo apt install -f
|
|
||||||
```
|
|
||||||
|
|
||||||
Do note that you don’t need to enter the above commands unless you find APT broken. Personally, I didn’t need these commands but I found them handy for some on the forums.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://itsfoss.com/free-boot-partition-ubuntu/
|
|
||||||
|
|
||||||
作者:[Ankush Das][a]
|
|
||||||
选题:[lujun9972][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://itsfoss.com/author/ankush/
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://itsfoss.com/free-up-space-ubuntu-linux/
|
|
||||||
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/free-boot-space-ubuntu-linux.jpg?resize=800%2C450&ssl=1
|
|
||||||
[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/09/apt-autoremove-screenshot.jpg?resize=800%2C415&ssl=1
|
|
||||||
[4]: https://itsfoss.com/remove-old-kernels-ubuntu/
|
|
||||||
[5]: https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/
|
|
||||||
[6]: https://linuxhandbook.com/uname/
|
|
||||||
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/09/uname-r-screenshot.jpg?resize=800%2C198&ssl=1
|
|
||||||
[8]: https://itsfoss.com/synaptic-package-manager/
|
|
||||||
[9]: https://itsfoss.com/optimize-ubuntu-stacer/
|
|
||||||
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/09/stacer-remove-kernel.jpg?resize=800%2C562&ssl=1
|
|
||||||
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/09/stacer-remove-kernel-header.png?resize=800%2C576&ssl=1
|
|
||||||
[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/09/command-kernel-list.png?resize=800%2C432&ssl=1
|
|
||||||
[13]: https://itsfoss.com/update-grub/
|
|
@ -0,0 +1,87 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: ( )
|
||||||
|
[#]: reviewer: ( )
|
||||||
|
[#]: publisher: ( )
|
||||||
|
[#]: url: ( )
|
||||||
|
[#]: subject: (How to Clear Terminal Screen in Ubuntu and Other Linux Distributions [Beginner’s Tip])
|
||||||
|
[#]: via: (https://itsfoss.com/clear-terminal-ubuntu/)
|
||||||
|
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||||
|
|
||||||
|
How to Clear Terminal Screen in Ubuntu and Other Linux Distributions [Beginner’s Tip]
|
||||||
|
======
|
||||||
|
|
||||||
|
When you are working in the terminal, often you’ll find that your terminal screen is filled up with too many commands and their outputs.
|
||||||
|
|
||||||
|
You may want to clear the terminal to declutter the screen and focus on the next task you are going to perform. Clearing the Linux terminal screen helps a lot, trust me.
|
||||||
|
|
||||||
|
### Clear Linux terminal with clear command
|
||||||
|
|
||||||
|
So, how do you clear terminal in Linux? The simplest and the most common way is to use the clear command:
|
||||||
|
|
||||||
|
```
|
||||||
|
clear
|
||||||
|
```
|
||||||
|
|
||||||
|
You need no option with the clear command. It’s that simple but there are some additional things you need to know about it.
|
||||||
|
|
||||||
|
![][1]
|
||||||
|
|
||||||
|
_**The clear command and other methods of clearing screen may depend on the terminal emulator you are using.**_ Terminal emulator is the terminal application that you use for accessing the Linux shell (command line).
|
||||||
|
|
||||||
|
If you use clear command on Ubuntu with GNOME Terminal, it will clear the screen and you won’t be able to see what else you had on the screen previously.
|
||||||
|
|
||||||
|
In many other terminal emulators or Putty, it may just clear the screen for one page. If you scroll with mouse or PageUp and PageDown keys, you can still access the old screen outputs.
|
||||||
|
|
||||||
|
Frankly, it depends on your need. If you suddenly realize that you need to refer to the output of a previously run command, perhaps having that option available will be helpful.
|
||||||
|
|
||||||
|
### Other ways to clear terminal screen in Linux
|
||||||
|
|
||||||
|
![][2]
|
||||||
|
|
||||||
|
Clear command is not the only way to clear the terminal screen.
|
||||||
|
|
||||||
|
You can use Ctrl+L [keyboard shortcut in Linux][3] to clear the screen. It works in most terminal emulators.
|
||||||
|
|
||||||
|
```
|
||||||
|
Ctrl+L
|
||||||
|
```
|
||||||
|
|
||||||
|
If you use Ctrl+L and clear command in GNOME terminal (default in Ubuntu), you’ll notice the difference between their impact. Ctrl+L moves the screen one page down giving the illusion of a clean screen but you can still access the command output history by scrolling up.
|
||||||
|
|
||||||
|
**Some other terminal emulators have this keyboard shortcut set at Ctrl+Shift+K.**
|
||||||
|
|
||||||
|
You can also use reset command for clearing the terminal screen. Actually, this command performs a complete terminal re-initialization. It could take a bit longer than clear command, though.
|
||||||
|
|
||||||
|
```
|
||||||
|
reset
|
||||||
|
```
|
||||||
|
|
||||||
|
There are a couple of other complicated ways to clear the screen when you want to clear the screen completely. But since the command is a bit complicated, it’s better to use it as [alias in Linux][4]:
|
||||||
|
|
||||||
|
```
|
||||||
|
alias cls='printf "\033c"'
|
||||||
|
```
|
||||||
|
|
||||||
|
You can add this alias to your bash profile so that it is available as command.
|
||||||
|
|
||||||
|
I know this was a pretty basic topic and most Linux users probably already knew it but it doesn’t harm in covering the elementary topics for the new Linux users. Isn’t it?
|
||||||
|
|
||||||
|
Got some secretive tip on clearing terminal screen? Why not share it with us?
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://itsfoss.com/clear-terminal-ubuntu/
|
||||||
|
|
||||||
|
作者:[Abhishek Prakash][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[译者ID](https://github.com/译者ID)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://itsfoss.com/author/abhishek/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/clear-command-linux.gif?resize=800%2C432&ssl=1
|
||||||
|
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/clear-terminal-screen-linux.png?resize=800%2C450&ssl=1
|
||||||
|
[3]: https://linuxhandbook.com/linux-shortcuts/
|
||||||
|
[4]: https://linuxhandbook.com/linux-alias-command/
|
@ -0,0 +1,173 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: (robsean)
|
||||||
|
[#]: reviewer: ( )
|
||||||
|
[#]: publisher: ( )
|
||||||
|
[#]: url: ( )
|
||||||
|
[#]: subject: (How to Free Up Space in /boot Partition on Ubuntu Linux?)
|
||||||
|
[#]: via: (https://itsfoss.com/free-boot-partition-ubuntu/)
|
||||||
|
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||||
|
|
||||||
|
如何在 Ubuntu Linux 上释放 /boot 分区的空间?
|
||||||
|
======
|
||||||
|
|
||||||
|
前几天,我收到一个警告,/boot 分区已经几乎满了或者已经没有剩余空间了。是的,我有一个独立的 /boot 分区,我相信现在很少有人这样做了。
|
||||||
|
|
||||||
|
这是我第一次看到这样一个错误,它让我很迷惑。现在,这里有一些 [方法来释放在 Ubuntu 上的分区][1] (或者基于 Ubuntu 的发行版) ,但是在这种情况下并不是所有的方法都能用。
|
||||||
|
|
||||||
|
这就是为什么我决定写这些我释放 /boot 分区空间的步骤的原因。
|
||||||
|
|
||||||
|
### 如何在 Ubuntu 上释放 /boot 分区的空间(如果你的 /boot 分区空间不足)
|
||||||
|
|
||||||
|
![][2]
|
||||||
|
|
||||||
|
我建议你仔细阅读这些解决方案,并由此得出最适合你情况的解决方案。解决方案的操作很容易,但是你需要在你的生产力系统上小心的执行这些解决方案。
|
||||||
|
|
||||||
|
#### 方法 1: 使用 apt autoremove
|
||||||
|
|
||||||
|
你不必是一名终端专家来做这件事,它只需要一个命令,你将移除未使用的内核来释放 /boot 分区中是空间。
|
||||||
|
|
||||||
|
你所有要做的事情是,输入:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt autoremove
|
||||||
|
```
|
||||||
|
|
||||||
|
这个命令不仅仅可以移除未使用的内核,而且也将摆脱你不需要的或工具安装后所不需要的依赖项。
|
||||||
|
|
||||||
|
在你输入命令后,它将列出将被移除的东西,你只需要确认操作即可。如果你很好奇它将移除什么,你可以仔细检查一下看看它实际移除了什么。
|
||||||
|
|
||||||
|
这里是它应该看起来的样子:
|
||||||
|
|
||||||
|
![][3]
|
||||||
|
|
||||||
|
你必需按 **Y** 按键来继续。
|
||||||
|
|
||||||
|
_**值得注意的是,这种方法只在你仅剩余一点点空间并并且得到警告的情况下才有效。但是,如果你的 /boot 分区已经满了,APT 甚至可能不会工作。**_
|
||||||
|
|
||||||
|
在接下来的方法中,我将重点介绍两种不同的方法,通过这些方法你可以使用 GUI 和终端来移除旧内核来释放空间。
|
||||||
|
|
||||||
|
#### 方法 2: 手动移除未使用的内核(如果 apt autoremove 不工作的话)
|
||||||
|
|
||||||
|
在你尝试 [移除一些旧内核][4] 来释放空间前,你需要识别当前活动的内核,并且确保你不会删除它。
|
||||||
|
|
||||||
|
为 [检查你的内核的版本][5] ,在终端中输入下面的命令:
|
||||||
|
|
||||||
|
```
|
||||||
|
uname -r
|
||||||
|
```
|
||||||
|
|
||||||
|
[uname 命令通常用于获取 Linux 系统信息][6] 。在这里,这个命令显示当前正在被使用的 Linux 内核。它看起来应该是这样:
|
||||||
|
|
||||||
|
![][7]
|
||||||
|
|
||||||
|
现在,你已经知道你当前的 Linux 内核是什么,你必需移除一个不同于这个版本内核的内核。你应该把它记录在某些地方,以便你不会不知不觉地移除它。
|
||||||
|
|
||||||
|
接下来,要移除它,你可以使用终端或 GUI .
|
||||||
|
|
||||||
|
警告!
|
||||||
|
|
||||||
|
在删除内核时一定要额外的小心。只识别和删除旧内核,而不是当前你正在使用的内核,否则你将会拥有一个残缺的系统。
|
||||||
|
|
||||||
|
##### 使用一个 GUI 工具来移除旧的 Linux 内核
|
||||||
|
|
||||||
|
你可以使用 [Synaptic 软件包管理器][8] 或一个类似 [Stacer][9] 的工具来开始。就我个人而言,当我遇到一个满满的 /boot 分区且 apt 损坏是,我使用 [Stacer][6] 来丢弃旧内核。因此,让我向你展示一下它看起的样子。
|
||||||
|
|
||||||
|
首先,你需要启动 “**Stacer**” ,然后导航到软件包卸载器,如下面屏幕截图所示。
|
||||||
|
|
||||||
|
![][10]
|
||||||
|
|
||||||
|
在这里,搜索 “**image**” ,你将找到你所拥有的 Linux 内核。你只需要删除旧内核版本的镜像,而不是当前内核的镜像。
|
||||||
|
|
||||||
|
在上面的屏幕截图中,我已经指出了我系统上的当前内核和旧内核,因此你必需注意你系统上的内核。
|
||||||
|
|
||||||
|
你没有必要删除任何其它东西,只需要删除旧的内核版本。
|
||||||
|
|
||||||
|
同样的,只需要在软件包列表中搜索 “**headers**” ,并删除如下显示的旧的 “**headers**” 版本。
|
||||||
|
|
||||||
|
![][11]
|
||||||
|
|
||||||
|
只是提醒你,你 **不希望移除 “linux-headers-generic”** 。只是关注那些与其相关的有版本号的。
|
||||||
|
|
||||||
|
然后,就这样,你完成了所有的工作,apt 将会再次工作,并且你将成功地释放来自 /boot 分区的一些空间。同样地,你也可以使用任意其它的软件包管理器来完成这些工作。
|
||||||
|
|
||||||
|
#### 使用命令行来移除旧内核
|
||||||
|
|
||||||
|
使用命令行来移除旧内核与使用 GUI 来移除旧内核是一样的。因此,如果你没有选择使用一款 GUI 软件 (如果它是一台远程机器/一项远程服务) 的权利,或者如果你只是对终端情有独钟,你可以仿效下面的步骤。
|
||||||
|
|
||||||
|
首先,使用下面的命令列出所有已安装的内核:
|
||||||
|
|
||||||
|
```
|
||||||
|
ls -l /boot
|
||||||
|
```
|
||||||
|
|
||||||
|
它应该看起来像这样:
|
||||||
|
|
||||||
|
![][12]
|
||||||
|
|
||||||
|
写为 “**old**” 的内核,或者不匹配你当前内核版本,都是未使用的内核,你可以删除它们。
|
||||||
|
|
||||||
|
现在,你可以使用 **rm** 命令来移除具体指定来自 /boot 分区中的内核,使用下面的命令(一个命令对应一个内核):
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo rm /boot/vmlinuz-5.4.0-7634-generic
|
||||||
|
```
|
||||||
|
|
||||||
|
务必检查你发系统的版本 — 它可能与你的系统的版本不同。
|
||||||
|
|
||||||
|
如果你有很多未使用的内核,这将需要一些时间。因此,你也可以下面的命令丢弃多个内核:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo rm /boot/*-5.4.0-{7634}-*
|
||||||
|
```
|
||||||
|
|
||||||
|
为了澄清这一点,你需要用逗号分隔内核版本号的最后一部分/编码,以便同时删除它们。
|
||||||
|
|
||||||
|
假设,我有两个旧的内核 5.4.0-7634-generic 和 5.4.0-7624 ,那么命令将是:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo rm /boot/*-5.4.0-{7634,7624}-*
|
||||||
|
```
|
||||||
|
|
||||||
|
如果你不希望在 grub 启动菜单中再看到这些旧的内核版本,你可以使用下面的命令简单地 [更新 grub][13] :
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo update-grub
|
||||||
|
```
|
||||||
|
|
||||||
|
就这样,你完成了所有的工作。你已经释放了空间,还修复了可能潜在的破损的 APT 问题,如果它是一个在你的 /boot 分区填满后出现的重要的问题的话。
|
||||||
|
|
||||||
|
在一些情况下,你需要输入这些命令来修复破损的 (正如我在论坛中注意到的):
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo dpkg --configure -a
|
||||||
|
sudo apt install -f
|
||||||
|
```
|
||||||
|
|
||||||
|
注意,除非你发现 APT 已破损,否则你不需要输入上面的命令。就我个人而言,我不需要这些命令,但是我发现这些命令对论坛上的一些人很有用。
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://itsfoss.com/free-boot-partition-ubuntu/
|
||||||
|
|
||||||
|
作者:[Ankush Das][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[robsean](https://github.com/robsean)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://itsfoss.com/author/ankush/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://itsfoss.com/free-up-space-ubuntu-linux/
|
||||||
|
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/free-boot-space-ubuntu-linux.jpg?resize=800%2C450&ssl=1
|
||||||
|
[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/09/apt-autoremove-screenshot.jpg?resize=800%2C415&ssl=1
|
||||||
|
[4]: https://itsfoss.com/remove-old-kernels-ubuntu/
|
||||||
|
[5]: https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/
|
||||||
|
[6]: https://linuxhandbook.com/uname/
|
||||||
|
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/09/uname-r-screenshot.jpg?resize=800%2C198&ssl=1
|
||||||
|
[8]: https://itsfoss.com/synaptic-package-manager/
|
||||||
|
[9]: https://itsfoss.com/optimize-ubuntu-stacer/
|
||||||
|
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/09/stacer-remove-kernel.jpg?resize=800%2C562&ssl=1
|
||||||
|
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/09/stacer-remove-kernel-header.png?resize=800%2C576&ssl=1
|
||||||
|
[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/09/command-kernel-list.png?resize=800%2C432&ssl=1
|
||||||
|
[13]: https://itsfoss.com/update-grub/
|
Loading…
Reference in New Issue
Block a user