The history
command is used in Linux to display a list of previously executed commands. You can also use the up arrow key on your keyboard to cycle through previous commands one at a time. To repeat the last command, you can simply type !!
.
The time command is used to time a command and not display the actual time. To display the time and date, the date command must be used.
''ipconfig/all''
The command is: diff file1.txt file2.txt
To get information on the options used by a Linux command, you can use the man command followed by the command name, like this: man [command]. This will display the manual page for the command, detailing its options and usage. Alternatively, you can often use the --help option with the command (e.g., [command] --help) to get a brief summary of options and usage.
Type top in a terminal to display Linux processes, which includes PID.
In Linux the man command displays the help(man page) for a command. man fdisk is "display the man page for command fdisk"
In Linux, the utility used to display the pathname of the current working directory is the pwd command, which stands for "print working directory." When executed, it outputs the full path of the directory you are currently in. This command is commonly used in terminal sessions to confirm your location within the file system.
To display a list of active and inactive network interfaces on Unix, Linux, and macOS, you can use the command ifconfig in the terminal. Alternatively, on modern Linux systems, ip addr or ip link can also be used to achieve the same result. On macOS, ifconfig is the primary command for this purpose as well.
$ cat filename | head
The df command displays drive capacities. The free command will show memory usage. The top command will show the system load of various processes.
In Linux the chmod command is used to set file permissions.
In many command-line interfaces, including UNIX/Linux shells, the command cd .. is used to return to the previous level in the directory hierarchy. Alternatively, in some applications or systems, the key combination Alt + Left Arrow can be used to navigate back to the previous location. However, the specific command or key combination may vary depending on the context or software being used.