Skip to main content

Linux Command Lines Quick Reference

Apt-based Package Manager Update and Upgrade

sudo apt update && sudo apt upgrade

pwd, cd, & ls

pwd – present working directory – shows the full path of the current directory you are in pwd ...

Enable Password Feedback

Add the line Default pwfeedback to the sudoer file to enable asterisks when typing in passwords f...

passwd

passwd can be used to change a user’s password, or force password change upon next login Change ...

Change Timezone

sudo dpkg-reconfigure tzdata

sed - quickly serach and replace text in a file

The command sed is a very powerful command that can be use to add, delete, or modify text in an f...

hostnamectl - Change the current hostname

The command hostnamectl can be use to quickly change the hostname of the Linux host. Running hos...

Setting Static IPs

Run the command ip link or ifconfig on the system to find out the Ethernet adapter name #Debian ...

Disk Usage - Check Free Spaces Available

You can use the df command on a Linux system to check the available disk space. df You might ...

Adding SSH Public Key and Disable SSH Password Authentication

Paste the SSH Public key inside the authorized_keys file in the .ssh folder of the user’s home di...

Regenerating SSH Host Keys

If you need to regenerate the SSH Host keys on a system, such as after you clone an Linux system ...

LVM - Logical Volume Manager

LVM, or Logical Volume Management, is a technology used in Linux to manage storage devices and pa...

History

The history command in the Linux terminal displays a list of previously executed commands by the ...