[last updated: 2024-05-01]
Linux home page
top 50 Linux commands (from: digitalOcean)
file and directory commands:
Linux script files
mounting external storage devices
(link to:) tecmint on systemd & systemctl
-----
On (or linked from) this page:
- General Notes:
- General Commands:
apt-get update & upgrade, clear, who, date, inxi, startx
- File and Directory Commands:
- File commands:
cp, mv, rm, find
- Directory commands:
pwd, cd, mkdir, rm
- Ownership and Permission commands:
chmod, chown
- System Commands:
ps, df, raspi-config, reboot, shutdown, dpkg, cat /proc/version and other variations, uname, python --version
- Conditional & Loop Commands:
- Mounting external storage
- Other Commands:
sudo, su, exit, lsusb, ls -l, whoami, chown, arecord -l, aplay, echo $PATH, dmesg, ifconfig, ssh
===============================================================
-----------------------------------------------------------------
- General commands:
- Before installing anything new (or even more often), do these commands:
$ sudo apt-get update
$ sudo apt-get upgrade
- $ sudo apt-get update ... synchronizes packages on your system with repository.
- $ sudo apt-get upgrade ... upgrades all installed packages
This step takes a few minutes to complete.
- However recently saw recommendation to use dist-upgrade instead of upgrade.
I confess I didn't understand the explanations of the differences,
More study needed, but for now I'll stick with upgrade.
- There is also confusion over whether to use apt or apt-get.
Best advice I've seen is that for Linux Mint, apt is sufficient
- $ reboot ... as name implies...
- $ shutdown -h now ... as name implies...
- $ clear ... clears terminal screen
- $ whoami ... the name of current user
$ who ... the name of the current user, the terminal they are logged in at, the date and time when they logged in. If it is a remote session, it also tell where they are logged in from.
- $ date ... gives current date
$ sudo date -s "18 APR 2023 07:25:00" ... change date if wrong and offline
- $ inxi -Fxz ... gives printout of hardware
- $ startx ... Opens the GUI (Graphical User Interface)
However this opens automatically on my installation, so I'm not sure when you'd need to use this...
-----------------------------------------------------------------
- File and Directory commands:
-----------------------------------------------------------------
- System commands:
-----------------------------------------------------------------
- Conditional & Loop Commands:
-----------------------------------------------------------------
- Other Commands:
----------
- Transfer files between computers:
- $ scp [source] [destination]
You do NOT need to use ssh to log into remote computer.
The scp command does that automatically, and logs you out again when done.
- copy a file from a local computer to a remote computer:
log in to local computer
open terminal in local computer
$ scp [path to source file on local computer] [username on remote computer]@[IP of remote computer]:[path to file destination on remote computer]
you will be prompted for password of the remote computer
- copy a file from a remote computer to a local computer:
log in to local computer
open terminal in local computer
$ scp [username on remote computer]@[IP of remote computer]:[path to source file on remote computer] [path to file destination on local computer]
you will be prompted for password of the remote computer
- copy a directory:
$ scp -r ...
-----------------------------------------------------------------
- ports and sockets: (link to:) tecmint
.
.
.
eof