Prime Stake Pool
WebsiteTwitterTelegram
  • Home
  • About Us
  • Server Setup Basics
    • How to setup your Cloud Server securely
      • Create new user
      • Use ssh key pair to access your server
        • Create .ssh folder
        • Create rsa key pair (public/private)
        • Copy rsa public key to remote server
      • Disable root login,password and change default port 22
      • Install fail2ban
      • Firewall rules
      • Enable 2FA
      • Setup video
    • Linux Swap Space
      • Add Swap Space
      • Kernel cache pressure and swappiness
      • Add swap video
  • Server Settings
    • Setting Up chrony
    • Static IP using Netplan
    • Time Synchronization
    • Important Settings
    • TMUX
  • Linux Commands
    • Basic Commands
    • Important Uses
  • Node Setup Guide
    • Cardano
      • How to minimize missed slot leader checks / missed blocks
        • Garbage collection
        • Run node in multicore mode
        • Turn off TraceMempool
    • Ethereum
  • Monitoring
    • Raspberry Pi ARM
    • Linux System x64
  • Maintenance
  • Logical Volume Management (LVM)
    • Basic concepts
    • LVM Resize
      • Decrease an LVM partition
      • Increase an LVM partition
    • Add a new PV to VG
    • LVM Commands
    • LVM on Pi
  • Disk Check
  • Backup Disk
Powered by GitBook
On this page
  1. Linux Commands

Important Uses

On Ubuntu Server 20.04 LTS

PreviousBasic CommandsNextCardano

Last updated 1 year ago

  1. Install updates via command line

sudo apt update        # Fetches the list of available updates
sudo apt upgrade       # Installs some updates; does not remove packages
sudo apt autoremove    # Removes any old packages that are no longer needed. This also removes older kernels. Only latest two are kept.
  1. Usage "autoclean", "autoremove" and "clean"

From the apt-get man page:

  • clean: clean clears out the local repository of retrieved package files. It removes everything but the lock file from /var/cache/apt/archives/ and /var/cache/apt/archives/partial/. When APT is used as a dselect(1) method, clean is run automatically. Those who do not use dselect will likely want to run apt-get clean from time to time to free up disk space.

  • autoclean: Like clean, autoclean clears out the local repository of retrieved package files. The difference is that it only removes package files that can no longer be downloaded, and are largely useless. This allows a cache to be maintained over a long period without it growing out of control. The configuration option APT::Clean-Installed will prevent installed packages from being erased if it is set to off.

  • autoremove: is used to remove packages that were automatically installed to satisfy dependencies for some package and that are no longer needed.

Every command has a manual page, if you want to know what their parameters are or what each of them do, just type in the shell `man ` Ex. `man apt-get

3. How to uninstall or remove <installed-application> software package from Ubuntu server.

You can uninstall or removes any installed software package itself from Ubuntu server through the terminal. Let us uninstall grub-common software packages from our system.

$ sudo apt-get remove grub-common

Uninstall grub-common including dependent package

If you would like to remove grub-common and it's dependent packages which are no longer needed from Ubuntu

$ sudo apt-get remove --auto-remove grub-common 

Use purging grub-common

If you use with purge options to grub-common package all the configuration and dependent packages will be removed

$ sudo apt-get purge grub-common 

If you use purge options along with auto remove, will be removed everything regarding the package, It's really useful when you want to reinstall again

$ sudo apt-get purge --auto-remove grub-common 
sudo truncate -s 0 /var/lib/ubuntu-release-upgrader/release-upgrade-available

5. Scroll/Navigate on ubuntu server

ls -l | less

The bar in the middle of the two commands is called the “pipe” which is the character option above the \ character on US keyboards. So in essence, you are taking the output of ls -l and piping it into the pager program on Linux called less or try more if less is not found. less will take all of the output from ls -l and present it to you one page at a time.

Remove update link error - Failed to connect to . Check your Internet connection or proxy settings.

manpage for the apt-get command
https://changelogs.ubuntu.com/meta-release-lts