
INTERNACIONALITZACIÓ
CHEAT SHEET ABOUT LINUX COMMANDS
1. File and Directory Navigation
pwd
– Shows the current directory.ls
– Lists files and directories.ls -l
– Lists with details (permissions, owner, size, date).cd [directory]
– Changes directory.cd ..
– Moves up one level in the directory structure.cd /
– Goes to the root directory.
2. File Management
touch [file]
– Creates an empty file.cp [source] [destination]
– Copies a file or directory.mv [source] [destination]
– Moves or renames a file or directory.rm [file]
– Deletes a file.rm -r [directory]
– Deletes a directory and its contents.
3. Text Manipulation
cat [file]
– Displays the content of a file.less [file]
– Allows paginated viewing of a file.head [file]
– Shows the first 10 lines of a file.tail [file]
– Shows the last 10 lines of a file.grep "text" [file]
– Searches for text within a file.
4. Permissions and Ownership
chmod [permissions] [file]
– Changes file permissions.chown [user:group] [file]
– Changes file ownership.
5. Process Management
ps
– Displays running processes.top
– Shows real-time processes.kill [PID]
– Terminates a process by its ID.killall [name]
– Terminates all processes with that name.
6. User and Group Management
whoami
– Shows the current user.who
– Displays users connected to the system.adduser [user]
– Adds a new user.deluser [user]
– Deletes a user.passwd [user]
– Changes a user’s password.
7. Networking
ping [host]
– Checks connectivity with another host.ifconfig
/ip a
– Displays network information.netstat -tulnp
– Shows open ports and associated processes.wget [URL]
– Downloads a file from the internet.curl [URL]
– Displays the content of a URL.
8. Package Management
(Depends on the distribution)
Debian/Ubuntu:
apt update
– Updates the package list.apt upgrade
– Updates installed packages.apt install [package]
– Installs a package.apt remove [package]
– Removes a package.
RedHat/CentOS:
yum update
– Updates packages.yum install [package]
– Installs a package.yum remove [package]
– Removes a package.
9. Compression and Files
tar -cvf file.tar [files]
– Creates a tar file.tar -xvf file.tar
– Extracts a tar file.gzip [file]
– Compresses a file.gunzip [file.gz]
– Decompresses a .gz file.zip [file.zip] [files]
– Creates a ZIP file.unzip [file.zip]
– Extracts a ZIP file.
10. Other Utilities
clear
– Clears the terminal screen.history
– Displays command history.echo "text"
– Prints text to the screen.date
– Displays the current date and time.shutdown -h now
– Shuts down the system immediately.reboot
– Restarts the system.
INFOGRAPHICS OF LYNUX OPERTING SYSTEMS
MOODLE'S GUIDE (QUIZZES)
REVIEW YOUR COMPREHENSION






