Trending December 2023 # How To Get Nvidia’s Gpu Assisted Video Encoding (Nvenc) To Work In Ubuntu # Suggested January 2024 # Top 12 Popular

You are reading the article How To Get Nvidia’s Gpu Assisted Video Encoding (Nvenc) To Work In Ubuntu updated in December 2023 on the website Katfastfood.com. We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested January 2024 How To Get Nvidia’s Gpu Assisted Video Encoding (Nvenc) To Work In Ubuntu

Encoding video files can be a complete drag. Even with the fastest CPUs out on the market, the process can take up to about as long as the video itself (e.g. thirty minutes of encoding for a thirty-minute video). No matter what encoding programs offer you, they are always limited by the power of your chips.

First Things First

To get NVIDIA’s NVENC working on Ubuntu, you first need to download the NVIDIA Video Codec software development kit (SDK) from this site. You will need to make an account, but the process is pretty straightforward. You don’t need all the files in the ZIP, so we’re now going to navigate to “Samples/common/inc.” Copy everything you see there to your “/usr/local/include” folder. You need to copy these files so that “ffmpeg” (an encoder frequently found with linux distros) will recognize NVENC and incorporate it.

Configuring Source Code Repositories

The next step will involve recompiling your current version of ffmpeg. This means that you’re going to need the build dependencies for the software, and for that you will have to configure Linux to allow downloading from source code repositories in your software sources.

Now for the tooth-grinding part of the process!

Rebuilding ffmpeg

Since ffmpeg doesn’t build with many of its options automatically enabled (meaning they’re almost all opt-in rather than opt-out), you’ll have to find out how it was built in your system and then build it using the same configuration plus support for NVENC and AAC audio. This is where the headers you copied earlier come in. See, ffmpeg will take a little peek at your files in “/usr/local/include” to find any codecs it doesn’t find in its own pockets.

First, we build dependencies with

sudo

apt-get build-dep

ffmpeg

Next, we want to download the AAC audio codec with

sudo

apt-get install

libfdk-aac-dev

Once those things are done, we will need to get the source to ffmpeg’s current version with

sudo

apt-get

source

ffmpeg

And when that’s done, you’re going to have to do a little hunting in your Home folder. Find a folder that starts with “ffmpeg.” It will have the version number right after it separated by a dash. Here’s mine:

Open your terminal in that folder. If you can’t do that, open the terminal and type:

cd

ffmpeg-2.8.8

Now type

ffmpeg

-buildconf

It will show you the entire configuration of your current ffmpeg installation. You’ll need to copy everything after “configuration:” without the bits below that massive wall of text. In my case, I’m copying this: (Your configuration might be different, so don’t copy what I’m showing you here.)

--enable-nonfree

--enable-nvenc

--enable-libfdk-aac

OK, now all you have to do is type

After all that is finished, type

make

Wait for that to be over with, then type

sudo

make

install

You’re done!

Testing It

OK, so how do you know you’ve successfully gotten support for NVENC? It’s time to take ffmpeg out for a spin and encode a video with it.

To do this, you will need a video file to convert. Let’s say that our video is in “/home/miguel/Desktop/test.mkv,” and we want to encode it as “/home/miguel/Desktop/test.mp4.” Here’s how we go about doing that with ffmpeg and its newfound love for NVENC:

time

ffmpeg

-i

/

home

/

miguel

/

Desktop

/

test.mkv

-acodec

copy

-vcodec

nvenc

/

home

/

miguel

/

Desktop

/

test.mp4

You should see something like this:

Miguel Leiva-Gomez

Miguel has been a business growth and technology expert for more than a decade and has written software for even longer. From his little castle in Romania, he presents cold and analytical perspectives to things that affect the tech world.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Sign up for all newsletters.

By signing up, you agree to our Privacy Policy and European users agree to the data transfer policy. We will not share your data and you can unsubscribe at any time.

You're reading How To Get Nvidia’s Gpu Assisted Video Encoding (Nvenc) To Work In Ubuntu

4 Useful Tools To Monitor Cpu And Gpu Temperature In Ubuntu

Ubuntu is one of most popular and widely used Linux distributions. It is known for its simplicity, reliability, and performance. However, like any other operating system, Ubuntu is not immune to overheating issues. Overheating can lead to a number of problems, such as decreased performance, system crashes, and even hardware damage. Therefore, it is important to monitor temperature of your CPU and GPU regularly to prevent such issues from occurring. In this article, we will introduce you to 4 useful tools to monitor CPU and GPU temperature in Ubuntu.

lm-sensors

lm-sensors is a command-line tool that allows you to monitor temperature, voltage, and fan speed of your CPU, GPU, and other system components. It is a powerful tool that can provide detailed information about your system’s hardware. To install lm-sensors, open terminal and type following command −

sudo apt-get install lm-sensors

Once installed, you can use following command to detect sensors on your system −

sudo sensors-detect

Follow on-screen instructions to configure lm-sensors for your system. After configuration process is complete, you can use following command to display temperature readings −

sensors

lm-sensors provides a lot of information, so it may take some time to get used to it. However, it is a very useful tool for monitoring CPU and GPU temperature in Ubuntu.

Psensor

Psensor is a graphical tool that displays temperature readings of your CPU, GPU, and other system components in real-time. It is a simple and easy-to-use tool that can help you monitor temperature of your system without having to use command-line. To install Psensor, open terminal and type following command −

sudo apt-get install psensor

Psensor also allows you to set up temperature alerts. You can configure Psensor to notify you when temperature of your CPU or GPU reaches a certain threshold. This can be very useful for preventing overheating issues.

Gnome System Monitor

Gnome System Monitor is a very useful tool for monitoring CPU and GPU temperature in Ubuntu. However, it does not provide as much information as lm-sensors or Psensor. It is more focused on displaying system’s resource usage.

Conky

Conky is a lightweight system monitor that displays system information on desktop. It can display a wide range of information, including CPU and GPU temperature. Conky is highly customizable, which allows you to configure it to display information that is most important to you.

To install Conky, open terminal and type following command −

sudo apt-get install conky-all

Once installed, you can launch Conky by typing “conky” in terminal. Conky displays system information on desktop in real-time. You can customize appearance of Conky by editing configuration file.

In addition to four tools we’ve discussed, there are a few more options available for monitoring CPU and GPU temperature in Ubuntu. Let’s take a look at some of them −

Hardinfo

Hardinfo is a system information and benchmarking tool that can also display real-time CPU and GPU temperature. To install Hardinfo, open a terminal and type following command −

sudo apt-get install hardinfo Nvidia System Monitor

If you have an Nvidia graphics card, you can use Nvidia System Monitor to monitor your GPU temperature. Nvidia System Monitor is a graphical tool that provides real-time GPU temperature information, as well as other performance data.

To install Nvidia System Monitor, open a terminal and type following command −

sudo apt-get install nvidia-settings Htop

Htop is a command-line tool that provides detailed information about processes running on your system. It also allows you to monitor CPU and GPU temperature. To install Htop, open a terminal and type following command −

sudo apt-get install htop

Once Htop is installed, you can launch it by typing “htop” in a terminal. To view CPU and GPU temperature, press “F2” key to open setup menu, then navigate to “Columns” section and select “CPU temp” and/or “GPU temp”.

Conclusion

In conclusion, monitoring temperature of your CPU and GPU is essential to prevent overheating issues that can lead to decreased performance and even hardware damage. In this article, we have introduced you to 4 useful tools to monitor CPU and GPU temperature in Ubuntu. lm-sensors is a powerful command-line tool that provides detailed information about your system’s hardware. Psensor is a simple and easy-to-use graphical tool that displays temperature readings in real-time. Gnome System Monitor is a graphical tool that provides detailed information about processes running on your system, including CPU and GPU temperature. Finally, Conky is a lightweight system monitor that displays system information on desktop and is highly customizable. Choose tool that best suits your needs and keep your system cool and running smoothly.

How To Install Drivers In Ubuntu

If you recently moved to Ubuntu from Windows or macOS and are looking for a way to install drivers in Ubuntu, you have come to the right place. We have added 4 detailed methods to update drivers in Ubuntu, right from downloading additional drivers to installing Nvidia’s latest graphical drivers. Apart from that, we have written separate articles on how to switch between Wayland and Xorg in Ubuntu and have compiled the best screen recording tools on Ubuntu for new users on Linux. On that note, let’s go ahead and learn how to manually install drivers in Ubuntu.

Install Drivers in Ubuntu (2023)

In this tutorial, we have added 4 ways to install drivers in Ubuntu. From updating additional drivers to moving to the latest branch for bleeding-edge updates, we have covered everything. You can expand the table below and move to any section you want.

Note: The below methods have been tested on Ubuntu 22.04.1 LTS (Jammy Jellyfish) build, and they work flawlessly well.

In case you are unaware, drivers on Ubuntu or Linux are directly built into the kernel, and they are handled by the system automatically. So whenever the kernel is updated, drivers are also patched immediately. Unlike Windows, you don’t need to manually find and install each of the drivers.

1. First of all, open the App Launcher on Ubuntu and open “Software and Updates“. You can also directly open “Additional Drivers”.

2. Next, move to the “Additional Drivers” section. Here, you can see that it’s already using the recommended driver (proprietary and tested) for my Nvidia GeForce GT 730 graphics card.

Install Drivers in Ubuntu From Terminal (CLI Method)

1. If you wish to update drivers in Ubuntu from the Terminal, well, you can do so using a bunch of commands. First off, open the Terminal from the app launcher or by pressing the “Ctrl + Alt + T” shortcut.

ubuntu-drivers devices

3. Here, you can choose which driver to install. For example, to install the latest recommended driver which is nvidia-driver-470, run the command in the below fashion.

sudo apt install nvidia-driver-470

or

sudo ubuntu-drivers install nvidia:470

4. You can also run the below command to install all the recommended drivers automatically in Ubuntu.

sudo ubuntu-drivers autoinstall

4. After the installation, reboot your computer and you will move to the latest stable version. Run the below command to check the current driver version.

nvidia-smi Install the Latest (Beta) Nvidia Drivers in Ubuntu

1. Open the Terminal in Ubuntu and run the below command to add the graphics driver PPA.

sudo add-apt-repository ppa:graphics-drivers/ppa

2. After that, run the below commands to update all the packages.

sudo apt update sudo apt upgrade

3. Now, execute the below command and it will list out all the latest drivers including both stable and beta builds. However, in my case, 470 is the latest driver, superseding even the beta build which has a version number of 465. So I can comfortably stay on 470.

ubuntu-drivers devices

4. If a new version displays for your graphics card, you can run the below command to install the beta Nvidia drivers. Just replace 470 with your latest beta build.

sudo apt install nvidia-driver-470 Install Nvidia Drivers in Ubuntu Using Official Installer

1. First off, open Nvidia’s website and enter your graphics card detail. Choose “Production Branch” for stable and “New Feature Branch” for beta drivers.

2. On the next page, download the Nvidia driver for your Ubuntu system. It will download a file in .run format.

4. Move to the “Permissions” tab and enable “Allow executing file as program“.

Note: I have SSHed into the Ubuntu computer from my Chromebook to capture the screen. It may look a bit different on your system.

6. In the text console mode, enter your Ubuntu username and password and log in. After that, run the below command to disable the graphical server.

sudo systemctl isolate multi-user.target

7. Now, unload the Nvidia driver that is currently in use by running the below command.

sudo modprobe -r nvidia-drm

sudo sh filename.run

10. Once the installation is done, execute the below command to enable the display server.

sudo systemctl start graphical.target

11. You may have to perform one more step. Run exit to close the current session and press “Ctrl + Alt + F2” to bring back the GUI interface.

12. Now, restart your computer, and the Nvidia driver in Ubuntu should be upgraded to the latest version.

Ubuntu Vs Chromeos Work Flows

In recent months, I’ve had the opportunity to dive into work flows between your typical Chromebook and an Ubuntu-based PC. This article will offer a comparison of the different work flows between the two Ubuntu and ChromeOS. We’ll examine common work flows like printing, scanning, word processing, email, among other tasks.

When using ChromeOS, you have one option for surfing the Web – the Chrome browser. And by itself, this isn’t necessarily a bad thing. After all, ChromeOS is dialed in nicely to provide outstanding performance using this browser. Plus, never having to worry about updating plugins like Flash is also a pleasant thing as well.

Ubuntu, however, differs in this area. First of all, Ubuntu users are presented with Firefox as their default browser. For some users, this is perfectly acceptable. But others may wish to explore alternative browsers for Ubuntu instead. Ubuntu has a wide variety of choices in terms of web browsers and each of them present their own unique spin on surfing the web.

The best choice is: It really depends on the user. If you’re someone well versed in keeping your system up to date, I’d say Ubuntu wins with flexibility. However if you’re someone who is notoriously bad about keeping your browser updated and have no interest in choosing your default browser, ChromeOS is the better fit for you.

When it comes to office tasks with ChromeOS, most people will likely find everything they need. Well, if they’re willing to re-think how they do things, that is. Allow me to elaborate a bit here. Email, calendar and a to-do list are all accessible at your leisure using ChromeOS. And if you’re already utilizing the Google app ecosystem, using these tools won’t be any different than you’ve done previously.

If you’re coming from, say, Microsoft Outlook using Exchange, however…the process requires an export of data into Google Apps. Yes, Google does support dual delivery options for stuff like email. But overall, it’s a process that tends to favor export to Google vs a seamless integration between Microsoft/Google ecosystems.

When performing office tasks on Ubuntu, you once again have far greater flexibility. Not only could you use your favorite browser to duplicate the Google App work flow described above, you can also run completely unrelated applications as well. Out of the box, you’re presented with Thunderbird (email), LibreOffice (office suite), among other solutions available from the software repositories. If after trying LibreOffice, you find it to be abysmal for some reason – you do have alternatives. WPS Office, for example, looks and runs almost exactly like Microsoft Office does. If this is important to you, then this is an available option.

Perhaps you’re in need of proper MS Exchange integration for your local PIM (personal information manager). Look no further, Thunderbird supports great add-ons for this and Google integration. The only downside I see with Thunderbird in the long run, is that the application’s future is a bit of an unknown. It’s available in 2023, but Thunderbird five years from now is a bit of mystery.

The best choice is: For the office place, Ubuntu all day long. Even when neck deep into a “Microsoft shop,” Ubuntu simply provides for greater integration, thanks to Thunderbird and various add-ons. For an office already using Google Apps as their default, however, I’d say it’s a tie as both Ubuntu and ChromeOS will support Google Apps equally.

To be blunt, printing with ChromeOS can be incredibly slow, network speed depending. Not putting blame on the interface. Rather, the fact that I must either use a Google Cloud friendly printer or the Chrome browser to send off a print job over the Internet, then back to my printer is simply stupid. Going even further, cloud print is completely unnecessary as ChromeOS utilizes the same technology for printing as Ubuntu does. The difference is Google managed to convolute it.

To be ultimately fair, however, speed of printing is usually only poor on slow Internet connections. So basically anyone living with a lousy DSL connection, speed caps or perhaps satellite Internet latency/speed issues. In short, you’re better off avoiding ChromeOS for any thing in an office environment.

Ubuntu (as do most distributions) has decent printer support. Even if there isn’t printer support right out of the box, you can usually find the right software from the manufacturer’s website. I love to watch the faces of new users as they see the printer setup page automatically detect their wifi printer simply by choosing “network printer” and waiting for a second. Most new users I find appreciate the idea of avoiding a setup disk for their printer.

The best choice is: Ubuntu wins this one all day long. ChromeOS printing is terrible and needs to be re-tooled in my opinion. For myself personally, printing over ChromeOS is doable as I have a great FiOS connection. But seeing it taking over an hour on slow DSL first hand, has made me cringe on more than one occasion.

Scanning documents with ChromeOS is comparable to printing with it. Short version, it stinks and requires an add-on for the Chrome browser. In short, it’s uses some scanning API and a two star rated Chrome add-on.

Chromebooks have outstanding battery life. I’ve seen them running 8 to 10 hours without missing a beat. Obviously watching Netflix or the like can significantly reduce those numbers. But regardless, the batteries included with Chromebooks seem to blend well with ChromeOS itself.

Ubuntu (Unity edition) has horrible battery life on even the most bleeding edge, highest capacity batteries. Why power management isn’t a priority out of the box always amazed me. Thankfully some Ubuntu spins like Ubuntu MATE offer decent power management out of the box. This is done with a tool called TLP. Using TLP, Ubuntu (or any distro) can detect when you’re connected to power or running on your notebook’s battery. This feature significantly increases your available battery life under Ubuntu. Going even deeper, you can also make additional changes (and save them) using PowerTOP.

The best choice is: If you’re needing a simple web browser on a laptop with great battery life, ChromeOS wins on the Chromebook. Ubuntu with TLP installed is good, but the ChromeOS compatibility with the Chromebook is better. Whether or not you choose to paint this as a hardware vs software issue is up to you.

For most people, I think Ubuntu wins overall. While ChromeOS has some great battery life and offers itself on affordable hardware, the printing and scanning is just too painful to ignore. Even though you’re sending a print job over a secure connection to the “cloud,” the fact remains the process is painful for anyone with a slow Internet connection.

What say you? Perhaps you have had different experiences with the two platforms? Hit the Comments and share your story with the other readers. I’d love to hear more about how you view ChromeOS vs Ubuntu work flows.

How To Upgrade Linux Kernel In Ubuntu

The Linux kernel is an essential part of the Linux operating system, acting as a link between software and hardware. Keeping current with the latest kernel version is critical since it provides several benefits such as greater stability, updated features, and enhanced security. This article will walk you through checking and updating the kernel version in Ubuntu 22.04.

Prerequisites

A server that runs Ubuntu Linux

A user account with sudo access

Ubuntu includes an apt tool.

Ubuntu’s built-in Update Manager (optional)

How to Check the Kernel Version on Ubuntu

There are several methods to determine the Ubuntu kernel version on your Ubuntu 22.04 system. Here are a few commonly used methods:

Use uname Command

Open a terminal

Enter the following command into the terminal:

uname -r

The uname command with the -r flag can be used to check the Ubuntu kernel version on Ubuntu 22.04.

Use cat command

You can use the following command to get the current Upgrade Linux kernel version, the version of GCC used to compile the kernel, and the kernel’s compilation time. To access the contents of this file, use the “cat” command,

cat /proc/version

Note: Please keep in mind that our Ubuntu 22.04 comes with the Kernel version 5.15.0.39 by default.

The kernel headers are provided by the Linux headers packages. It is responsible for running the latest kernel’s drivers and modules.

In this guide we will use an executable file to download the .deb files and upgrade kernel to latest available version.

Download the Executable Script

Use the “wget” command to download the executable script file from Github.

Once downloaded make the file as executable and move it into the /usr/local/bin directory.

chmod +x ubuntu-mainline-kernel.sh

Move the file to the above mentioned directory.

sudo mv chúng tôi /usr/local/bin/ Check Available Linux Kernel Versions

Now you can execute the downloaded file to check for all versions and also for available latest versions.

Execute the below command to check if there are any latest versions available with the -c option.

ubuntu-mainline-kernel.sh -c

You will get an output similar to the one below if there are any latest versions available.

Finding latest version available on chúng tôi v6.3.7 Finding latest installed version: none A newer kernel version (v6.3.7) is available

If you need to list all available versions you can execute the below command with the -r option.

ubuntu-mainline-kernel.sh -r

You will get a big set of lists as shown below.

v3.2.85 v3.2.90 v3.2.92 v3.2.93 v3.2.94 v3.2.95 v3.2.96 v3.2.97 v3.2.98 v3.2.99 v3.2.100 v3.2.101 v3.4.113 v3.8.3 v3.8.7 v3.12.65 v3.12.66 v3.12.67 v3.12.68 v3.12.69 v3.12.70 v3.12.71 v3.12.72 v3.12.73 v3.12.74 v3.14.74 v3.14.75 v3.14.77 v3.14.78 v3.14.79 v3.16.40 v3.16.45 v3.16.50 v3.16.55 v3.16.60 v3.16.65 v3.16.70 v3.16.75 v3.16.76 v3.16.77 v3.16.78 v3.16.79 v3.16.80 v3.16.81 v3.16.82 ... Install Latest Kernel Version

Now you can install the latest version using the below command.

sudo chúng tôi -i

Type Y and ENTER to accept. Once the installation is complete, you will see something similar to the one below.

Latest version is: v6.3.7, continue? (y/N)

Downloading amd64/linux-headers-6.3.7-060307-generic_6.3.7-060307.202306090936_amd64.deb: 100% Downloading amd64/linux-headers-6.3.7-060307_6.3.7-060307.202306090936_all.deb: 100% Downloading amd64/linux-image-unsigned-6.3.7-060307-generic_6.3.7-060307.202306090936_amd64.deb: 100% Downloading amd64/linux-modules-6.3.7-060307-generic_6.3.7-060307.202306090936_amd64.deb: 100% Downloading amd64/CHECKSUMS: 100% Downloading amd64/CHECKSUMS.gpg: 100% Importing kernel-ppa gpg key ok Signature of checksum file has been successfully verified Checksums of deb files have been successfully verified with sha256sum Installing 4 packages Cleaning up work folder

Install Specific Kernel Version (Optional)

If you wish to install any specific kernel version you can you can pass the version number you need to install.

sudo chúng tôi -I v6.3.7 Reboot the System

After successfully installing the kernel packages, you must reboot your system in order for the modifications to take effect for the kernel version to be updated.

To restart your computer, run the following command:

sudo reboot

To determine the installed kernel version on Ubuntu 22.04, run the following command:

sudo chúng tôi -l Output v6.3.7-060307 cat /proc/version Output Linux version 6.3.7-060307-generic ([email protected]) (x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1) 12.3.0, GNU ld (GNU Binutils for Ubuntu) 2.40) #202306090936 SMP PREEMPT_DYNAMIC Fri Jun 9 09:47:18 UTC 2023

Now you have the latest version of kernel updated in your Ubuntu 22.04.

Also read: You might also find useful our guide on How to Add Users to Sudoers in Linux

Conclusion

To summarize, upgrading the Linux kernel in Ubuntu is a simple process that provides various benefits such as faster performance, increased security, and access to the most recent features. Ubuntu users may easily stay up to date with the latest kernel versions and enjoy a more streamlined and secure operating system by following the appropriate steps.

How To Empty Your Trash Automatically In Ubuntu With Autotrash

Are you losing GBs of storage space because you forget to clear your trash? With AutoTrash, you can get Ubuntu to empty trash automatically on its own, based on the conditions you specify.

Installation of AutoTrash

You won’t find AutoTrash in many distributions’ repositories anymore. For most users, the easiest way to install it is through an unofficial snap version, available at the snap store.

If using Ubuntu, which in its latest versions already supports snaps by default, you can find the program in the software center by searching for “autotrash.”

sudo

snap

install

autotrash-unofficial

If the program isn’t available through your distribution’s repositories but you also have a distaste for snaps, there is a solution. Since it’s a Python script, you can use pip to install autotrash with:

pip

install

autotrash

When you install it like that, for ease of use, make sure to include its location in your PATH variable.

Set an alias

If you installed AutoTrash through the simpler route of snap, you can try it by typing autotrash-unofficial in a terminal. Alternatively, you can set up an alias for easier access.

If you would prefer to type autotrash instead of autotrash-unofficial to run the tool, type the following in the terminal:

sudo

snap

alias

autotrash-unofficial autotrash Clean your Trash

AutoTrash comes with a list of parameters that allow you to customize how it will clear your trash.

Using -d, you can define a date threshold. Everything moved to the trash within the specified number of days will remain intact; AutoTrash will wipe out everything older. For example, to eliminate all files older than 10 days, use:

autotrash

-d

10

If you have ample free space, there is no point in trying to free up even more by removing older files. Instead of checking it yourself, though, you can specify a free space threshold with --max-free. The values are in megabytes.

If you want AutoTrash to exterminate everything older than ten days only if your free space has dived under 4 GB, you would use:

autotrash

-d

10

--max-free

4096

Since 1 GB = 1024 MBs, the above number translates to 4 GB (4 x 1024).

You can have AutoTrash ensure that you always have at least 512 megabytes of free space available with:

autotrash

-d

10

--min-free

512

--keep-free

512

You can change 512 to whichever value you prefer.

It’s best to always make sure the results of any action will be what you originally intended. You can have AutoTrash perform a test run that makes no actual changes to your data, using the --dry-run switch. This doesn’t come with any extra values. Include it as is at the end of your command to check its outcome. Thus, with this addition, the previous example would look like:

autotrash

-d

10

--min-free

512

--keep-free

512

--dry-run

Automatic Purging

Having to run AutoTrash to purge the contents of your trash manually is far from optimal. Thankfully, it’s easy to have it run automatically. You can set up a cron job for that, but we think the following approach is even more straightforward.

Search for “startup” among your applications and open Startup Applications Preferences.

Create an empty bash script in whichever way you prefer and enter your AutoTrash command. I created a folder called Scripts in my home directory and then an empty Bash script named autoautotrash.sh inside it.

I entered my autotrash command, saved the changes (Ctrl + W), and exited Nano (Ctrl + X).

With your command in your script, make it executable by entering the following in your favorite terminal:

chmod

+x SCRIPT_FILE

In my case, this command looks like:

That’s it. From now on, whenever you log in to your desktop, your script will be one of the first things that runs, purging files from your trash and freeing up precious storage.

Now that you have emptied your trash, if you are still looking for more ways to clean up your Ubuntu machine, check this out.

Odysseas Kourafalos

OK’s real life started at around 10, when he got his first computer – a Commodore 128. Since then, he’s been melting keycaps by typing 24/7, trying to spread The Word Of Tech to anyone interested enough to listen. Or, rather, read.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Sign up for all newsletters.

By signing up, you agree to our Privacy Policy and European users agree to the data transfer policy. We will not share your data and you can unsubscribe at any time.

Update the detailed information about How To Get Nvidia’s Gpu Assisted Video Encoding (Nvenc) To Work In Ubuntu on the Katfastfood.com website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!