Linux Commands

Ubuntu

CommandUsage

uname -a

Display system information

neofetch

See image.

sudo lshw

All your hardware info

lscpu

Info about CPU architecture

df

Disk Usage info

`diff -q <directory-1> <directory-2>

Difference between two directories

sudo useradd -m -d /opt/tomcat -U -s /bin/false tomcat

Add user called tomcat /bin/false ensures that one can't login using tomcat

vi /etc/passwd

Check out this file to see a list of all users

wget

lvextend

Extend size of a logical volume in a Linux system

lvextend -l 100%FREE /dev/mapper/volumegroup-logicalvolume

Extend size of the given logical volume using all the remaining free space

resize2fs

The resize2fs command is used to resize the file system on a Linux block device, such as a partition, after the underlying block device's size has been changed. Usage : resize2fs <device>

Last updated