User Tools

Site Tools


useful_commands

Basic info about your distribution

cat /etc/os-release


What is my computer's ip address

ifconfig

or

ifconfig | grep inet

How to restart your network connection

sudo service network-manager restart

See which tasks and processes are running

top

Which linux kernel/version

uname -a

How much RAM memory is used

free -m

How to find out exact installation date of your Linux OS

sudo su
fs=$(df / | tail -1 | cut -f1 -d' ') && tune2fs -l $fs | grep created

See sources list your OS is using

cat /etc/apt/sources.list

Run an app as root

sudo nemo

List all installed packages

dpkg --list

Update and/or delete an app

sudo apt-get upgrade firefox            <-- update an app
sudo apt-get remove “package-name”      <-- delete app
sudo apt-get purge “package-name”       <-- delete apps + settings
sudo apt-get autoremove                 <-- remove all dependencies you don't need
sudo apt autoclean && sudo apt autoremove

Enable firewall

sudo ufw enable

Disable firewall

sudo ufw disable  

Show your PC specifications

inxi -Frxzc0 

Output of a command to a text file\ fx

dpkg --list --> app_list.txt

Shortcut to shutdown/restart/suspend
CTRL+DEL+END

Run several teminals in one terminal
Start by installing the app 'screen'.

sudo apt install screen

To start a screen session, simply type screen in your console:

screen

This will open a screen session, create a new window and start a shell in that window.

Now that you have opened a screen session you can get a list of commands by typing:

Ctrl+a ?

You can detach from the screen session at any time by typing:

Ctrl+a d

The program running in the screen session will continue to run after you detach from the session.

You can get a list of commands by typing:

Ctrl+a ?

Quick I need an txt editor

This key combination fires up, an editor in the terminal, instantaneously:

Ctrl+x+e

useful_commands.txt · Last modified: 2019/12/06 09:13 by dino