Difference between revisions of "CheatSheet"
Views
Actions
Namespaces
Variants
Tools
(Rest) |
(Lookover) |
||
Line 18: | Line 18: | ||
=== Maintenance === | === Maintenance === | ||
Generate cache list {{UserCmd|command=du -sh ~/.cache/*}} | Generate cache list {{UserCmd|command=du -sh ~/.cache/*}} | ||
Purge files not accessed in 100 days {{UserCmd|command=find ~/.cache/ -type f -atime +100 -delete}} | Purge files not accessed in 100 days {{UserCmd|command=find ~/.cache/ -type f -atime +100 -delete}} | ||
Line 27: | Line 28: | ||
=== AUR === | === AUR === | ||
Search for packages {{UserCmd|command=pamac search -a [PackageName]}} | Search for packages {{UserCmd|command=pamac search -a [PackageName]}} | ||
Build the package{{UserCmd|command=pamac build [PackageName]}} | Build the package{{UserCmd|command=pamac build [PackageName]}} | ||
=== Access rights === | === Access rights === | ||
Execute command as root {{UserCmd|command=sudo [command]}} | |||
Emptie password cache {{UserCmd|command=sudo -k}} | |||
Edit /etc/sudoers {{UserCmd|command=sudo visudo}} | |||
Change user password {{UserCmd|command=passwd}} | |||
Change owner and group of file {{UserCmd|command=chown [owner]:[group] -c [file]}} | |||
Change file permissions {{UserCmd|command=chmod [permissions] -c [file]}} | |||
Set permissions in octal mode: 4(read) 2(write) 1(execute) | Set permissions in octal mode: 4(read) 2(write) 1(execute) | ||
Example: 755 read-write-execute for owner and read-execute for group and others | Example: 755 read-write-execute for owner and read-execute for group and others | ||
Display files and permissions [of directory]{{UserCmd|command=ls -lh [dir]}} | |||
=== Files and Directories === | === Files and Directories === | ||
Change the working directory {{UserCmd|command=cd [dir]}} | |||
change to parent directory {{UserCmd|command=cd ..}} | |||
also | List directory contents {{UserCmd|command=ls -l}} | ||
List also hidden files {{UserCmd|command=ls -la}} | |||
Copie file {{UserCmd|command=cp [file] [target]}} | |||
Copie directory '''recursively''' {{UserCmd|command=cp -r [directory] [target]}} | |||
Move or rename file/directory {{UserCmd|command=mv [source] [target]}} | |||
Remove directory '''recursively''' {{UserCmd|command=rm -r [dir]}} | |||
Create symbolic link {{UserCmd|command=ln -s [target] [link]}} | |||
Mount filesystem {{UserCmd|command=mount -t [type] [/dev/sdx9] [mountpoint]}} | |||
Mount ISO image {{UserCmd|command=mount -o loop [iso] [mountpoint]}} | |||
Home directory of user {{UserCmd|command=cd /home/$USER}} {{UserCmd|command=cd ~}} | |||
Directory with global configurations {{UserCmd|command=cd /etc}} | |||
=== Network === | === Network === | ||
Display network information {{UserCmd|command=nmcli}} | |||
List wireless access points {{UserCmd|command=nmcli c}} | |||
Enable firewall [package Community: ufw] {{UserCmd|command=ufw enable}} | |||
Allow/deny all incoming traffic {{UserCmd|command=ufw default [allow/deny]}} | |||
Displays firewall status and rules {{UserCmd|command=ufw status}} | |||
Allows/deny incoming traffic on the specified port {{UserCmd|command=ufw [allow/deny] [port]}} | |||
Allows/deny incoming traffic from specified IP address {{UserCmd|command=ufw [allow/deny] from [ip]}} | |||
=== System and Screen === | === System and Screen === | ||
Display kernel version {{UserCmd|command=uname -r}} | Display kernel version {{UserCmd|command=uname -r}} | ||
Display long kernel version {{UserCmd|command=uname -a}} | Display long kernel version {{UserCmd|command=uname -a}} | ||
Line 84: | Line 90: | ||
Shut down the system {{UserCmd|command=shutdown -h now}} | Shut down the system {{UserCmd|command=shutdown -h now}} | ||
Restart the system {{UserCmd|command=shutdown -r now}} | Restart the system {{UserCmd|command=shutdown -r now}} | ||
<!-- More Detail for formatter: https://www.mediawiki.org/wiki/Help:Formatting --> | <!-- More Detail for formatter: https://www.mediawiki.org/wiki/Help:Formatting --> | ||
<!-- Don't forget to look more templates: https://wiki.manjaro.org/index.php/Help:Template --> | <!-- Don't forget to look more templates: https://wiki.manjaro.org/index.php/Help:Template --> |
Revision as of 18:49, 4 February 2022
CheatSheet for Manjaro
The original startet with a thread at https://forum.manjaro.org/t/manjaro-cli-cheat-sheet/101305/3
Locating and Installing Packages
Update mirrorlist with the fastest mirrors
Check if updates are available
Update all installed packages
Search available packages
Install packages
Uninstall packages
Maintenance
Generate cache list
Purge files not accessed in 100 days
Report journal current size
Remove but recent entries by size or time
Check for orphaned packages
Remove all orphans
Remove all packages except the latest 3 versions
AUR
Search for packages
Build the package
Access rights
Execute command as root
Emptie password cache
Edit /etc/sudoers
Change user password
Change owner and group of file
Change file permissions
Set permissions in octal mode: 4(read) 2(write) 1(execute)
Example: 755 read-write-execute for owner and read-execute for group and others
Display files and permissions [of directory]
Files and Directories
Change the working directory
change to parent directory
List directory contents
List also hidden files
Copie file
Copie directory recursively
Move or rename file/directory
Remove directory recursively
Create symbolic link
Mount filesystem
Mount ISO image
Home directory of user
Directory with global configurations
Network
Display network information
List wireless access points
Enable firewall [package Community: ufw]
Allow/deny all incoming traffic
Displays firewall status and rules
Allows/deny incoming traffic on the specified port
Allows/deny incoming traffic from specified IP address
System and Screen
Display kernel version
Display long kernel version
Report file system disk space usage
Display system tasks
Display system information
Display a tree of processes
Switch to tty Ctrl+Alt+F[1..6]
Switch to the X session Ctrl+Alt+F7
starts a daemon
stops a daemon
Shut down the system
Restart the system
See Also
Example Link Title example text