Key takeaways:
- The SSH command is essential for accessing a Linux machine remotely.
- The LS, PWD, and CD commands are used for navigating the Linux file system.
- The Touch, Echo, and Nano commands can be used to create and edit files in Linux.
- The MKDIR, CP, MV, RM, and LN commands are used for managing files and directories in Linux.
- The Clear, Whoami, and SU commands are miscellaneous Linux commands that can be useful in various situations.
Navigating the Linux File System #
- The command is used to connect to a Linux machine remotely. The syntax is , where is the username and is the IP address or domain name of the server.
- The command is used to list the files in the current working directory. The and switches can be used to display a detailed list and show hidden files, respectively.
- The command is used to print the current working directory.
- The command is used to change the current working directory. The syntax is , where is the name of the directory to change to. The and commands can be used to move up one directory and go to the home directory, respectively.
Managing Files and Directories in Linux #
- The command is used to create a new file. The syntax is , where is the name of the file to create.
- The command is used to display a message on the screen. The syntax is message, where is the message to display. The command can be used to create a new file with the specified message.
- The command is used to edit a file in Linux. The syntax is , where is the name of the file to edit. The , , and keys can be used to save and exit the file.
- The command is used to create a new directory. The syntax is , where is the name of the directory to create.
- The command is used to copy a file or directory. The syntax is , where is the file or directory to copy and is the location to copy it to.
- The command is used to move or rename a file or directory. The syntax is , where is the file or directory to move or rename and is the new location or name.
- The command is used to remove a file or directory. The syntax is , where is the name of the file to remove. The and switches can be used to remove directories and force-remove files, respectively.
- The command is used to create a link to a file or directory. The syntax is , where is the file or directory to link to and is the name of the link.
Miscellaneous Linux Commands #
- The command is used to clear the screen in Linux.
- The command is used to display the current username.
- The command is used to switch to a different user. The syntax is , where is the name of the user to switch to. The command can be used to switch back to the previous user.
- The and commands are used to add a new user and change a password, respectively. The syntax is and , where is the name of the user to add or change the password for. The command can be used to run a command with elevated privileges. The syntax is , where is the command to run.
- The and commands are used to install and update packages on Debian/Ubuntu and Red Hat-based systems, respectively. The syntax is and , where is the name of the package to install or update.
- The command is used to display information about a user. The syntax is , where is the name of the user to display information for.
- The and commands are used to display the manual and a brief description of a command, respectively. The syntax is and , where is the name of the command to display information for.
- The and commands are used to download files from the internet. The syntax is and , where is the URL of the file to download and is the name of the file to save it as.
- The and commands are used to compress and extract files, respectively. The syntax is zip warning: name not matched: filename
zip error: Nothing to do! (filename.zip) and , where is the name of the file to compress or extract.
- The command is used to view a file one page at a time. The syntax is , where is the name of the file to view.
- The and commands are used to display the beginning and end of a file, respectively. The syntax is , where is the name of the file to display.
- The and commands are used to compare two files and display the differences between them, respectively. The syntax is , where and are the names of the files to compare or display the differences for.
- The command is used to sort the lines in a file. The syntax is , where is the name of the file to sort.
- The command is used to search for files and directories. The syntax is , where is the directory to search in, is the search criteria, and is the pattern to search for.
- The and commands are used to change the permissions and ownership of a file or directory, respectively. The syntax is , where is the new user or permissions and is the name of the file or directory to change.
- The and commands are used to display the IP address and network configuration, respectively. The syntax is , where is the command to run.
- The and commands are used to test the connection to a host and display the route to a host, respectively. The syntax is , where s215 is the name of the host to test or display the route to.
- The and commands are used to display the network statistics and sockets, respectively. The syntax is , where is the command to run.
- The command is used to manage the firewall in Linux. The syntax is Usage: ufw COMMAND
Commands: enable enables the firewall disable disables the firewall default ARG set default policy logging LEVEL set logging to LEVEL allow ARGS add allow rule deny ARGS add deny rule reject ARGS add reject rule limit ARGS add limit rule delete RULE|NUM delete RULE insert NUM RULE insert RULE at NUM route RULE add route RULE route delete RULE|NUM delete route RULE route insert NUM RULE insert route RULE at NUM reload reload firewall reset reset firewall status show firewall status status numbered show firewall status as numbered list of RULES status verbose show verbose firewall status show ARG show firewall report version display version information
Application profile commands: app list list application profiles app info PROFILE show information on PROFILE app update PROFILE update PROFILE app default ARG set default application policy, where is the port to allow or deny.
- The and commands are used to display the system information and a pretty system overview, respectively. The syntax is , where may need to be installed first with .
- The command is used to display a calendar in the terminal. The syntax is Maja 2024
ni po wt śr cz pi so
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 _2_1 22 23 24 25
26 27 28 29 30 31
, where the Maja 2024
po 6 13 20 27
wt 7 14 21 28
śr 1 8 15 22 29
cz 2 9 16 23 30
pi 3 10 17 24 31
so 4 11 18 25
ni 5 12 19 26 package may need to be installed first with . - The command is used to perform arithmetic calculations in the terminal. The syntax is , where is the calculation to perform.
- The command is used to display the memory usage in Linux. The syntax is total used free shared buff/cache available Mem: 2,0Gi 876Mi 999Mi 38Mi 171Mi 1,1Gi Swap: 0B 0B 0B, where is used to display the information in a human-readable format.
- The command is used to display the disk usage in Linux. The syntax is Filesystem Size Used Avail Use% Mounted on /dev/mapper/pve-vm--215--disk--0 25G 17G 6,7G 72% / none 492K 4,0K 488K 1% /dev udev 63G 0 63G 0% /dev/net tmpfs 63G 16K 63G 1% /dev/shm tmpfs 13G 400K 13G 1% /run tmpfs 5,0M 0 5,0M 0% /run/lock tmpfs 13G 0 13G 0% /run/user/5501, where is used to display the information in a human-readable format.
- The and commands are used to display the running processes and their system resource usage, respectively. The syntax is , where may need to be installed first with .
- The and commands are used to kill a running process by its PID or name, respectively. The syntax is , where is the signal to send and is the PID or name of the process to kill.
- The command is used to manage the system services and daemons in Linux. The syntax is , where is the name of the service to manage.
- The and commands are used to display the command history and reboot or shut down the system, respectively. The syntax is , where may have a delay of one minute unless the switch is used.
Summary for: Youtube