ls
β List files and directories.ls -la # List with details and hidden files
-l
- Long items properties display.-a
- Show hidden files(., ..)-la
- The 2 previous commands merged.cd
β Change directory.cd /desired/path
pwd
β Show the current directory path.mkdir
β Create a new directory.mkdir new_directory
rm
β Delete files or directories.rm file.txt # Deletes a file rm -r directory # Deletes a directory and its content
cp
β Copy files or directories.cp file.txt /destination/path
mv
β Move or rename files.mv file.txt new_name.txt
pacman
β Arch Linux package manager.sudo pacman -S package # Install a package sudo pacman -R package # Remove a package sudo pacman -Syu # Update the system sudo pacman -Qs keyword # Search installed packages
systemctl
β Service and daemon management.sudo systemctl start service # Start a service sudo systemctl stop service # Stop a service sudo systemctl enable service # Enable a service at startup sudo systemctl status service # Check the status of a service
htop
β Interactive process monitor.sudo pacman -S htop && htop
- Note: If you want to enable or manage a service with systemd only locally(User only), you need to run one or more of this commands:
systemctl --user start service # Start a service systemctl --user stop service # Stop a service systemctl --user enable service # Enable a service at startup systemctl --user status sevice # Check the status of a service
- Syntaxis of systemctl command:
If it is globally
systemctl --option [command] [service]
sudo systemctl --option [command] [service]
cat
β Show the content of a file.cat file.txt
less
β View long files.less file.txt
nano
orvim
β Text editors.nano file.txt
- Note: If the file is in a high-rights level
Example:
sudo [program] <file>
sudo vim /etc/conf.d/sensord
df
β View filesystem usage.df -h
du
β Check disk usage of a directory or file.du -sh directory
lsblk
β View partitions and block devices.lsblk
- Connecting to internet
For Ethernet
dhcpcd
daemon will stablish the connection. For WiFi, you can useiwd
package ornetworkmanager
package- Who can be installed with
sudo pacman -S iwd
orsudo pacman -S networkmanager
- And activated with systemd(systemctl)
- Who can be installed with
ping
β Test connectivity to an address.ping -c 4 google.com
ip
β Configure and display network information.ip a
chmod
β Change file permissions.chmod 755 file.sh
chown
β Change the owner of a file.sudo chown user:group file.txt
tar
β Create or extract tar files.tar -czvf file.tar.gz directory tar -xzvf file.tar.gz
zip
/unzip
β Compress or decompress zip files.zip -r file.zip directory unzip file.zip
- Note:
zip
/unzip
packages must be installed before runningzip
/unzip
, you can install them with the following command:sudo pacman -S zip unzip
.
Ctrl + C
β Interrupt a running command.Ctrl + Z
β Suspend a process.Ctrl + R
β Search commands in history.!!
β Execute the last command.sudo !!
- Xscreensaver:
sudo pacman -S xscreensaver
Screensaver - Conky:
sudo pacman -S conky
Desktop Widgets - bpytop:
sudo pacman -S bpytop
Better htop