Windows News and info 15th Anniversary 2009-2024
Other Operating Systems => Linux, gOS, Harmony OS, Moblin, Ubuntu, OpenSuse => Topic started by: javajolt on July 23, 2025, 03:29:28 AM
-
(http://i.ibb.co/bMsc5Bcy/linux-commands-2.png)
41. jobs command
Jobs are tasks or commands that are running in your current shell. To check them, use the jobs command with the following syntax:
jobs [options] [Job_ID]
Running this command without any argument will show all jobs running in the Terminal’s foreground and background. If you don’t have any ongoing tasks, it will return an empty output.
You can display more detailed information about each job by adding the -l option. Meanwhile, use -n to show only tasks whose status has changed since the last notification.
42. ki:ll command (http://www.hostinger.com/tutorials/how-to-kill-a-process-in-linux)
Use the kill command to terminate a process using its ID. Here’s the basic syntax:
kill [signal_option] Process_ID
To obtain the process ID, run the following command:
ps ux
The kill command has 64 termination signals. By default, it uses the SIGTERM method that lets the program save its progress before closing.
43. shutdown command (http://www.hostinger.com/tutorials/linux-shutdown-command)
The shutdown command lets you turn off or restart your Linux system at a specific time. Here’s the syntax:
shutdown [option] [time] [message]
If you run the command without any arguments, your system will shut down immediately. You can specify the schedule using a 24-hour format or a relative one. For example, enter +5 to shut down the system after five minutes. To restart the machine, add the -r option.
The message argument specifies the notification other users in your system will receive before the server shuts down.
44. ping command (http://www.hostinger.com/tutorials/linux-ping-command-with-examples)
The ping command sends packets to a target server and fetches the responses. It is helpful for network diagnostics. The basic syntax looks like the following:
ping [option] [hostname_or_IP_address]
By default, ping sends infinite packets until the user manually stops it by pressing Ctrl + C.
However, you can specify a custom number using the -c option. You can also change the interval between transfers by adding -i.
For instance, let’s send 15 packets every two seconds to Google’s server:
ping -c 15 -i 2 google.com
(http://i.ibb.co/prztKRMM/ping-command-sends-packets-to-google-with-custom-settings.png)
45. wget command (http://www.hostinger.com/tutorials/wget-command-examples)
The wget command lets you download files from the internet via HTTP, http, or FTP protocols. Here’s the syntax:
wget [options]
By default, the wget command will download an item to your current working directory. For example, run this command to retrieve the latest WordPress installer:
(http://[/quote)wget http://wordpress.org/latest.zip
46. cURL command] (http://www.hostinger.com/tutorials/curl-command)
By default, the wget command will download an item to your current working directory. For example, run this command to retrieve the latest WordPress installer:
wget http://wordpress.org/latest.zip
46. cURL command (http://www.hostinger.com/tutorials/curl-command)
Use the cURL command to transfer data from or to a server by specifying its URL. The basic syntax looks as follows:
curl [options] URL
Running cURL without an option will print the website’s HTML content in your Terminal. If you add the -O or -o option, the command will download files from the specified link.
The cURL command is also helpful for testing API or server endpoints. You can do so by adding the –X option followed by an HTTP method (http://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Methods), depending on whether you want to fetch or upload data.
For example, the following command will retrieve data from a specific API endpoint:
curl -X GET http://api.example.com/endpoint
47. scp command (http://www.hostinger.com/tutorials/linux-scp-command)
The scp command lets you securely copy files and directories between systems over a network. The syntax looks as follows:
scp [option] [source username@IP]:/[directory and file name] [destination username@IP]:/[destination directory]
If you are copying items to or from your local machine, omit the IP and path. When transferring a file or folder from a local machine, specify its name after options.
For example, we will run the following to copy file1.txt to our VPS’ path/to/folder directory as root:
scp file1.txt root@185.185.185.185:path/to/folder
You can change the default SCP port by specifying its number after the -P option. Meanwhile, use the -l flag to limit the transfer bandwidth and add –C to enable compression.
48. rsync command (http://www.hostinger.com/tutorials/how-to-use-rsync)
The rsync command syncs files or folders between two destinations to ensure they have the same content. The syntax looks as follows:
rsync [options] source destination
The source and destination can be a folder within the same system, a local machine, or a remote server. If you are syncing content with a VPS, specify the username and IP address like so:
rsync /path/to/local/folder/ vps-user@185.185.185.185:/path/to/remote/folder/
You can add the -a option to sync the file or folder’s attributes as well, including their symbolic links. Meanwhile, use the -z flag to enable compression during the transfer.
49. ip command
The ip utility lets you list and manage your system’s network parameters, similar to the ifconfig command in older Linux distros (http://www.hostinger.com/tutorials/best-linux-distros). Here’s the syntax:
ip [options] object command
Running this command without any argument will print the manual, including an explanation about acceptable options and objects.
To manage a network parameter, specify the action in the command argument. For example, run this to show your system’s IP address:
ip address show
(http://i.ibb.co/CKmspq8b/ip-command-shows-the-system-ip-address-information.png)
(http://i.ibb.co/tT4THGRz/pro-tip.png)
50. netstat command
The netstat command (http://www.hostinger.com/tutorials/netstat-command) displays information about your system’s network configuration. The syntax is simple:
netstat [options]
Add an option to query specific network information. Here are several flags to use:
• -a – displays listening and closed sockets.
• -t – shows TCP connections.
• -u – lists UDP connections.
• -r – displays routing tables.
• -i – shows information about network interfaces.
• -c – continuously outputs network information for real-time monitoring.
51. traceroute command
The traceroute command tracks a packet’s path when traveling between hosts, providing information like the transfer time and involved routers. Here’s the syntax:
traceroute [options] destination
You can use a hostname, domain name, or IP address as the destination. If you don’t specify an option, traceroute will run the test using the default settings.
Change the maximum packet hops using the -m option. To prevent traceroute from resolving IP addresses, add -n.
You can also enable a timeout in seconds using the -w flag followed by the duration.
52. nslookup command
The nslookup command requests a domain name system (http://www.hostinger.com/tutorials/what-is-dns) (DNS) server to check a domain linked to an IP address or vice versa. Here’s the syntax:
nslookup [options] domain-or-ip [dns-server]
If you don’t specify a DNS server, nslookup will use your internet service provider’s default resolver. You can add other options to change how this command queries an IP address or a domain.
For example, use the -type= option to specify the information you want to check, such as the DNS records.
You can also set up automatic retry with the -retry= flag and add -port= to use a specific port.
(http://i.ibb.co/prbwpXBS/nslookup-command-resolves-a-domain-name-to-ip-addresses.png)
Since some Linux distros don’t have this utility pre-installed, you might encounter the “command not found” error. You can configure it by downloading bind-utils or dnsutils via your package manager.
53. dig command (http://www.hostinger.com/tutorials/linux-dig-command)
The domain information groper or dig command displays information about a domain. It is similar to nslookup but more comprehensive. The syntax looks as follows:
dig [options] [server] [type] name-or-ip
Running dig without an argument will check A records of the specified domain using the operating system’s default resolver. You can query a particular record by specifying it in the [type] argument like the following example:
dig MX domain.com
To run a reverse DNS lookup, add the –x option and use an IP address as the target.
54. history command
Run the history command to check previously run utilities. Here’s its syntax:
history [options]
Add the -r option if you want to clear the Terminal history. To rerun a specific utility from the list, enter an exclamation mark followed by its ID.
For example, use the following to run the 145th command:
!145
(http://i.ibb.co/pj1Zcw6S/history-command-prints-terminal-history.png)
55. man command
The man or manual command displays a comprehensive guide of another utility. The syntax looks like the following:
man [options] [section_number] command_name
If you specify only the command name, man will display the entire manual. Alternatively, you can select one of the nine sections (http://man7.org/linux/man-pages/man7/man-pages.7.html) using their IDs to print more specific information.
For example, run the following to check the library call section of the ls command’s manual:
man 3 ls
56. echo command
Use echo to print text in your command as a Terminal output. Here’s the syntax:
echo [options] [text]
You can also add the redirection symbol (>) to print the text in a file instead of Terminal. If you use two symbols (>>), it will append the existing content. The command syntax looks like this:
echo [options] [text] > [file_name]
If your text contains an environment or shell variable (http://afni.nimh.nih.gov/pub/dist/edu/data/CD.expanded/AFNI_data6/unix_tutorial/basic/basic_05.vars.html) like $var, echo will display the actual value. This command is commonly used for testing and bash scripting (http://www.hostinger.com/tutorials/bash-scripting-tutorial).
57. ln command
The ln command links files or directories with a shortcut. The syntax looks as follows:
ln [options] source target
This command will automatically create the shortcut, meaning you don’t need to make one manually. For example, the following will enable you to open file.txt using shortcut.txt:
ln target.txt shortcut.txt
By default, ln creates a hard link, meaning changes in the source will be reflected in the linked item and vice versa. To set up a soft or symbolic link, add the -s option.
58. alias and unalias command
The alias command (http://www.hostinger.com/tutorials/linux-alias-command) lets you set another name for a string that belongs to a file, text, program, or command name. Here’s the syntax:
alias name='string'
For example, the following will assign k as the alias for the kill command, allowing you to use the letter instead of the full name.
alias k='kill'
To check a command’s alias, run alias followed by an alternative name. For example, we will check the previous snippet:
alias k
(http://i.ibb.co/V0Nhz3BJ/alias-commands-shows-a-letter-associated-with-a-command.png)
You can remove an alias by running this syntax:
unalias [name]
59. cal command
The cal command displays a calendar in your Linux command-line interface. Here’s the syntax:
cal [options] [month] [year]
If you don’t add any argument, the command will show the current date. Alternatively, you can enter a specific month and year in a numerical format.
You can also add the -3 option to show the current, previous, and next month.
60. apt and dnf command
The apt command lets you manage advanced package tool (APT) libraries in Debian-based operating systems such as Ubuntu and Kali Linux (http://www.hostinger.com/tutorials/what-is-kali-linux). The syntax looks like this:
apt [options] subcommand
The subcommands define the action, like updating the library, upgrading software, installing an application, or removing a package. For example, we will install the Vim text editor:
apt install vim
In Linux, package management commands differ across distributions. For example, Red Hat Enterprise Linux-based distros like CentOS and AlmaLinux use dnf. It has the same syntax and options as apt.
Running both apt and dnf requires superuser privileges, which you can only obtain with sudo or via root.
Conclusion
Linux commands enable system administrators to manage their servers more efficiently. They provide capabilities like scripting, variables, and automation that graphical user interfaces need to improve.
In this tutorial, we have explained the 60 most commonly used Linux commands. These will be invaluable for various tasks, including file management, user administration, navigation, and network configuration.
Take advantage of the Kodee AI assistant to use these commands more efficiently. It lets you use simple prompts to write various utilities and scripts according to your task to save time and effort.
source (http://www.hostinger.com/tutorials/linux-commands)