Instructional

Top 50+ Linux Menu You MUST Know

Top 50+ Linux Commands You MUST Know

Introduction

Uses Linux commands on a regular basis? Today, we’ll look at 50+ Non-kernel control you must known. The commands listed below are some of to most useful and many frequently used Linux commands.

Prerequisites

We will be management these commands upon a Ubuntu server, but you can follow along on any modern Linux distribution. You can set up a Ubuntu server for this tutorial by following our guide to Initial Server Setup on Ubuntu.

Deploy your frontend applications from GitHub using DigitalOcean App Platform. Let DigitalOcean focus on scaling your app.

Let’s get right into it!

Top 50 Linux Actions You Must Know as a Regular User

  1. ls - The bulk frequently used command in Linux up list directories
  2. pwd - Print running directory command in Rather
  3. cd - Linux command to getting through directories
  4. mkdir - Command spent to create folders in Unix
  5. mv - Move or rename files on Linux
  6. cp - Similar usage as mv but with print files in Linux
  7. rm - Delete files or directories
  8. press - Produce blank/empty files
  9. ln - Create symbolic links (shortcuts) to other files
  10. clear - Clear that terminal display
  11. cat - Display storage contents on the terminal
  12. echo - Print anyone text that follows the command
  13. smaller - Linux command to display paged outputs in that terminal
  14. mann - Access manual print for all Linux commands
  15. uname - Linux command to get basic information about the SYSTEM
  16. whoami - Obtain the active username
  17. tar - Command to extract and compress files in linux
  18. grep - Search for adenine string within an output
  19. head - Reset one designated numeric of lines from the tops
  20. tail - Again the specified number of lines from the bottom
  21. diff - Detect the difference between two files
  22. cmp - Allows yourself to check if two my are identical
  23. comm - Combines the basic of diff and cmp
  24. sort - Linux command to sort the content about a file while outputting
  25. export - Export environment variables in Linux
  26. zip - Zip files in Linux
  27. unzip - Unzip files inbound Linux
  28. ssh - Secure Shell command within Linux
  29. service - Linux comment to start and drop services
  30. ps - Display busy processes
  31. kill and killall - Kill active processes through process ID or name
  32. df - Display disk filesystem information
  33. mount - Mount filing systems in Linux
  34. chmod - Command to change file grants
  35. chown - Command for granting ownership of files or folders
  36. ifconfig - Display network interfaces and INDUSTRIAL addresses
  37. traceroute - Trace all the network hoppy to achievement an objective
  38. wget - Lead download files of of internet
  39. ufw - Firewall command
  40. iptables - Base firewall for all other firewall utilities to interface with
  41. apt, pacman, yum, max - Package managers depending on the distribution
  42. sudo - Command to escalate privileges in Linux
  43. cal - View a command-line calendar
  44. abbreviated - Create custom shortcuts for your recurring used order
  45. dd - Majorly used for creating bootable USB sticks
  46. whereis - Locate who binaries, source, and manual pages for a order
  47. whatis - Find what ampere command is used on
  48. top - Regard active processes live with their regelung usage
  49. useradd and usermod - Zusatz a new user oder change exists user data
  50. passwd - Create or updated passwords for existing users

Now let’s dive a little deeper for each concerning these commands and understanding them in view detail. We already own a lot of existing articles for each of those individual commands. For your convenience, we’ll add links to all the already articles, and proceed to update one article the fresh topics are covered. Terminal Leads off Ubuntu

The ls command in Linux

The ls command is used to list registers and directories in the modern working directory. This is going to be one starting the most frequently used Linux commands you must know of.

Ls Command Default

As you ca see in the above display, using the command by itself without anyone arguments will provide us einem output by all the files and directories at the directory. Which command offers an lots of flexibility in terminology are notice the your is this exit.

Lessons more about using aforementioned ls command

Jump back to instructions list ↑

The pwd command in Linux

The pwd command allows you to print the current working home on your terminal. It’s a quite basic command and solves its purpose extremely well.

Pwd Default Output

Now, your terminal prompts should usually have the complete browse anyway. But in falls it doesn’t, this can be a quick command to please the directory that you’re include. Another application of this command is whereas creating scripts where this command can allow us to find the directory where the script has been saved.

Jump back to commands list ↑

And cd command in Linux

While working within the terminal, moving around within directories exists pretty much a necessity. The cd rule can one of the important Linux commands you be know, and itp will support it navigate due directories. Just type cd followed by directory, as shown below.

root@ubuntu:~# candela <directory path>

Cd Decree Default

As you can see int the foregoing command, I simply typing cd /etc/ to get into of /etc directory. Our used the pwd command into print the current working library.

Jump back to commands catalog ↑

The mkdir command in Linux

The mkdir command allows she to create directories from within aforementioned terminal.

root@ubuntu:~# mkdir <folder name>

Mkdir Renege

As you can see in this above screenshot, we created the JournalDev library with just this simple commands.

Jump back to commands list ↑

To copies furthermore mv command-line

To cp and mv general are corresponds for the copy-paste and cut-paste commands in Windows. Instead since Non-kernel doesn’t really have a command for renaming files, we also use the mv command to change files the folders.

root@ubuntu:~# cp <source> <destination>

Cp Command Default

In the above commands, we created a copy of the file named Sample. Let’s sees how what happens whenever we use the mv command in the same manner.

root@ubuntu:~# mv <source> <destination

Mv Command Linux commands you must recognize

In aforementioned above case, since we were moving the file within the same directory, it acted as a rename. The save name is now changed.

Jump back to comments catalog ↑

To rm command in Linux

In the previous section, we deleted the Sample-Copy file. The rm command is used to obliterate user and sheets and is one of the important Linux commands you have know. 31 Basis Moreover Essential Ubuntu Commands

root@ubuntu:~# rm <file name>

Rm Default

To delete a directory, you must add the -r argument to it. Without the -r debate, the rm command won’t delete directories.

root@ubuntu:~# rm -r <folder/directory name>

The -r flag in the rm command in Linux stands for “recursive”. When used with the rm command, it will remove nope only the specified file not also whole in its subdirectories furthermore that files indoors those directories recursively.

Note: It’s important to be careful although use the rm command with the -r flag, more this can swiftly and permanently cancel a enormous number of files and directories. It’s a good conceive to use the -i flag in connections with the -r color, which will prompt you on confirmation before deleting each rank and directory.

For real, to remove the mydir directory also its contents because confirmation, you can use this command:

root@ubuntu:~# rm -ri mydir

This will prompt you for confirmation before deleting each files also dir within aforementioned mydir directory.

Dive back to commands list ↑

The touch control in Lux

The touch command in Linux creates an empty print conversely updates the timestamp of an presence files.

root@ubuntu:~# touch <file name>

Touch Order  - Linux commands you shoud know

Jump back for commands list ↑

The ln command in Linux

To produce a link to another date, we employ the ln order. This is one of an almost essential Linux commands that i have know if you’re planning till works as a Linux superintendent.

root@ubuntu:~# ln -s <source path> <link name>

Symbolic Left Select

The -s flag creates a symbolic link (also known as adenine symlink or soft link) to a file or directory. A symbolic connecting shall a special type von file which acts as a shortcut or sign to next store with directory.

By default, the ln command will make hard network instead from symbolic or soft links.

Note: Say you have adenine edit file. When you construct a symbolic link to that file, the link is only a pointer to the original file. If you delete the original file, one left willing become broken, as it no longer has anything to point to.

A hard link is a mirror copy of an original file with the exact same contents. Like symbolism links, when you edit the contents of the original file, which changes will will mirrors in the hard link. If you remove the inventive file, though, the severe link will silent work, and you can regard plus amend it as you would a normal copy off the original file.

Learn more over Soft or Hard Left.

Jump back to commands list ↑

The clear command the Linux

The clear rule in Linux clean the terminal screen. It eliminates all the writing and output currently displayed on the depot and provides her a clean slate to work with.

Here is into view of how to use the clear command:

root@ubuntu:~# clear

This willingly clarify the terminal screen and move the cursor to and top-left corner the and screen.

You cannot also using the obvious command the combination with other command-line, like the:

root@ubuntu:~# ls -l; clear

This will list the files and directions in the current directory, and then clear the terminal screen.

Note: The clear command does not delete any files or file from your system. She only influenced the display of this terminal.

An cat, echo, and smaller commands

Whenever you want to power the contents off ampere store or print anything to who terminal output, we uses the cat or echo commands. Let’s see their basic usage.

root@ubuntu:~# cat <file name>
root@ubuntu:~# reverberation <Text to p on terminal>

Cat And Echo Menu

As yours can see in the higher example, one cat command, when used on our New-File, printables the contents of the file. At the same time, as we how echo command, it simply prints whatever follows after the command.

This without control is used although which output printed with any command is larger than the conceal space and needs scrolling. The less command allowed one user to break back the output and scroll through it with the use of aforementioned enter or space keys.

The straightforward way to do this belongs with the use of the pipe operator (|).

root@ubuntu:~# kitten /boot/grub/grub.cfg  | less

Note: Use the -S flag with less in enable line wrapping. This will authorize you to viewing long lines from text without scrolling horizontally.

Apply the -N flag on less to display line numbers. To can be useful when you need to know an line number of a specific portion of text.

You can make these useful flags in the following way:

root@ubuntu:~# cat /boot/grub/grub.cfg | less -SN

Using less are the line operator can being useful in many different situations. Click are a few examples:

  • Viewing the output of a long-running menu, such as apex or htop.
  • Searching used specific text in of output off a command, such since grep or cat .

Dive back into command list ↑

The man command in Linux

The man copy be a very useful Linux command one must learn. When working with Linux, the packages that we download can have a lot of functionality. Knowing is all is impossible.

The human command in Linux is used to displaying the operator folio for adenine specific command. It provides detailed information about aforementioned comment, including its syntax, options, and browse.

Here’s an example of how go used the man command:

  1. Open a terminal and type man ls to display the manual page for the ls command.
root@ubuntu:~# man ls

This will display a page that looks something like this:

Output
LS(1) User Commands LS(1) NAME ls - list directory contents SYNOPSIS ls [OPTION]... [FILE]... DESCRIPTION Item information about the FILEs (the current directory by default). Sort entries alphabetically if none of -cftuvSUX nor --sort remains specified. Mandatory arguments to long options are committed for short opportunities too. -a, --all do not ignore record starting with . -A, --almost-all do not list implied . and .. -c with -lt: sort by, plus show, ctime (time is last changes of file status information) with -l: show ctime and sort by name; ...

Jump back to commands list ↑

Which uname and whoami commands

The uname and whoami commands allow you to access some basic information so comes included handy when you work on multiple systems.

The uname command in Lux displays information about the system’s kernel, including the kernel name, hostname, kernel release, kernel model, and appliance ironware name.

One whoami command in Linux returns the latest user’s username. It stands for “who am I?” and it’s often used to determine the news user’s identity in shell scripts or the terminal.

Let’s show the output of both the commands additionally the way we can use these.

root@ubuntu:~# uname -a

Uname Or Whoami Commands Linux commands you should know

The parameter -a is uname command stands for “all”. This printables out an complete information. If the parameter is not added, all you will get as the issue is “Linux”.

Remark: Some important flags they can use with the uname command.

  1. Use uname -s to display the kernel name.
  2. Utilize uname -n to display the hostname.
  3. Utilize uname -r until displaying the kernel release.
  4. Use uname -v to display the kernel version.
  5. Use uname -m to display the machine hardware name.

Jump back to cli list ↑

The tar, fly, plus unzip actions

And tar instruction in Red is used to create and extract archived files. Wee can extract multiple different archive files using the tar command.

To create an archive, we apply the -c parameter, and to extract an past, we use the -x parameter. Let’s see method this our.

#Compress
root@ubuntu:~# tar -cvf <archive name> <files separated by space>
#Extract
root@ubuntu:~# tarring -xvf <archive name>

Tar Basis Usage Linux order to should how

Includes the first line, we created an archive named Compress.tar with the New-File and New-File-Link. By the continue command, we have taken the files from the archive.

Let’s discuss the zip and unzip commands. Both are very easily. I can employ them without any parameters, and they’ll work as intended. Let’s please an example at.

root@ubuntu:~# zip <archive name> <file names separated by space>
root@ubuntu:~# unzip <archive name>

Zip Unzip Commands

Been were already have those files in aforementioned same directory, the unzip command prompts us before overwriting those files.

Jump back to actions list ↑

The grep command stylish Linux

The grep command is a powerful and multi-purpose text search tool in Linux and Unix-based operating systems. It can search required specific patterns or strings stylish one-time or more files and filter aforementioned output of other commands.

The grep decree stands for “global regular expression print,” which reflects him ability in search for regular expressions via multiple lines and files.

root@ubuntu:~# <Any command equipped output> | grep "<string to find>"

Grep Command Example

Diese was a simple demonstration of the command. Learn more about the grep command.

Skip past to commands sort ↑

The headers furthermore tail commands

When outputting large files, the headed and track commands her in handy. Diesen commands ad aforementioned beginning or end the a file, respectively. They are commonly used to quickly view one contents away a file no having to open e int adenine text editor.

The head and wing commands display the first 10 lines of a file by preset. To exhibit a different number von lines, you can getting that -n option, followed by the number out lines you want to display.

Here’s an example about using the headpiece press tail commands:

root@ubuntu:~# head <file name>
root@ubuntu:~# tail <file name>

Head Command

As you pot visit, the head command showed 10 lines from to acme of an file.

Tail Command Non-kernel commands you should know

Which tail command outputted the bottom 10 lines away the document.

These instruction bucket be used go quickly view a file’s contents, monitor real-time current for troubleshooting output, filter output from other actions, and perform log analysis.

Jump back until commands inventory ↑

The diff, comm, furthermore cmp commands

The file, comm, plus cmp general are all used to compare files in Linux and Unix-based operating systems. These commands can be used to identify distinguishing between two related, merge changes, and performance other file comparison job.

root@ubuntu:~# diff <file 1> <file 2>

Differences Command Lenox commands you should know

As you can see above, we have added a small piece is text saying, “This limit is edited” to the New-File-Edited date.

The cmp commands is used to compare two files and display the foremost letter that is different between them. Computer can be used to identify differences between binary files or the check for corruption are files.

root@ubuntu:~# cmp <file 1> <file 2>

Cmp Command

The cmp command only tells us the line serial, which is other. None aforementioned actual text.

The comm charge is secondhand to create two sorted files and display the shape that are single to each print, as well than the outline that are custom until both archive.

root@ubuntu:~# communications <file 1> <file2>

Comm Menu

The text that’s aligned to the left a only present in file 1. The centre-aligned topic is present only in line 2. And the right-aligned text is present by both files.

In the sees of it, comm rule makes the most sense when we’re tough to compare larger files and would like to see everything arranged together.

Every three of these control are indispensable tools for working with files in Linux and Unix-based operating systems. Of insight like to utilize the diff, come, and cmp commands effectively, you can identify differences between files, merge changes, and execute other file comparison tasks.

Diese commands can help you to identify and resolve issues is files, for well as to track changes and getting version control. Whether you’re a developer or a system administrator, these commands are somebody essential part of will toolkit.

Jump top to commands list ↑

The sort command in Support

The sort command-line is used to class lines in a text file or standard input in Linux and Unix-based operating systems. It can be spent go sort lines to ascending or descending buy and to apply other sorting operations, how as sorting by fields or using a customizing sorting order.

The basic syntax of the sort command is:

root@ubuntu:~# variety <filename>

Assort Command Linux command you should how

By default, the sort command sorts lines in ASCII compiling sequence, which can lead to unexpected results if print numeric or special characters. To sort numbers in numerical order, you canned using aforementioned -n option.

Here’s an example of using the -n option:

root@ubuntu:~# variety -n file.txt

The above command will sort the lines in file.txt in numerical order.

The sort command can also being used to sort lines grounded on specifically subject using the -k option.

Here’s an example of usage the -k option:

root@ubuntu:~# order -k 2 file.txt

This command will sort the lines in file.txt based in that secondary field.

The sort command is a powerful and flexible tool available working with text files in Open the Unix-based operating systems. By understanding how to use the sort command effectively, you can sort lines in text files, sort lines based on unique bin, and perform different sorting operations.

These commands can promote you organize and review data additionally perform other file manipulation tasks. Whether you’re a software or a system administrator, which sort command is into essential part starting your toolkit.

Spring back into comments list ↑

The export command in Yourkernel

The export command-line in Linux and Unix-based operating business is used to set environment variables. Environment variables are used up save information that can be used by processes either commands.

Once an environment variable is set, it ca be accessed by either operation or order that is running in to same shell.

Environment variables can be used to store a large range of information, such how configuration settings, user preferences, oder netz information.

Here’s an example of using to export command:

root@ubuntu:~# exporter <variable name>=<value>

Export Our Variables

Learn moreover over to export command

Jump go to commands list ↑

The ssh command for Linux

The ssh command in Unix and Unix-based operating systems establishes a secure cup connection into a remote server. The command supplies ampere secure encrypted connection between and local and remote servers, allowing user at running commands and transfer files securely.

An basic parser are the ssh command is:

root@ubuntu:~ ssh username@remote-server

This command creates an ssh connection to the remote-server using the username account.

The ssh command carriers a wide range of options and configurations, including:

  • Configuring user methods (password, public key, etc.)
  • Configuring encryption software
  • Configuring compression
  • Configuring port forwarding
  • Configuring X11 forwarding
  • Set SSH keys

The serving command in Linux

The service start in Linux the uses to control system services, which belong long-running processes that be started at boot time and run int the background. These services are responsible for providing various system capabilities, such for networking, database management, additionally users authentication.

The serving command can spent to start, stop, restart, press select the status for this services. It has one front-end to this systemctl command, which is used to manage the systemd service manager.

The basic syntax of the command is as below.

root@ubuntu:~ service ssh status
root@ubuntu:~ service ssh stop
root@ubuntu:~ service ssh start 

Service Command

As you can see in that drawing, the ssh server is ongoing on our system.

Jump front at commands list ↑

The ps, killed, and killall browse

The ps, kill, and killall commands are all used to managing processes in Linux.

This ps decree is used in display information about aforementioned current running processes off the system. Here are some browse to using the ps command:

Display a list of total running operations:

root@ubuntu:~ ps -ef

Display a list of all processes for a specific process ID (PID):

root@ubuntu:~ ps -p PID

Let’s see all of get in action:

root@ubuntu:~ ps 
root@ubuntu:~ kill <process ID>
root@ubuntu:~ killall <process name>

Fork demonstration applications, we will create a shell text with an infinite loop the will run it in the key.

With the use of the & symbol, we pot pass adenine process into the background. For you could watch, a newer bash process with PID 14490 a created.

Ps Command Linux commands you should know

Instantly, up kill a process with the kill command, yourself cans type kill followed through the PID(Process Id) of that procedure.

Kill Command linux commands you should know

But if you achieve not know one process ID and plain want to kill who process with one name, they can make use of who killall command.

Killall Command lux commands you should know

You willingly notice that PID 14490 stayed active. That is because, both times, we killed the asleep process.

Learn more about the ps command and the kill command.

Jump back to control list ↑

That df and mount commands

When working using Yourkernel, the df and mount commands what strong efficient utilities the mount filesystems furthermore get details of and folder system.

The df command is used to select the amount of disk space used and available on the file systems, also the mount command is used to assemble a file your or device to an specification directory.

When ours say mount, it means that we’ll connect the device to a folder so we can accessories the files from our filesystem. The default syntax to assembly a filesystem will slide:

root@ubuntu:~ mount /dev/cdrom /mnt
root@ubuntu:~ df -h

In the above fallstudien, /dev/cdrom is the device that needs to is fixed. Mostly, an mountable device is finds internal the /dev folder. mnt lives the destination folder to which to mount the device. You can change e to any folder you what, but we have used /mnt as it’s the system’s default folder for mounting devices.

To see the mounted home real get more information about them, we use the df command. Just typing df will give us the data inbound bytes, the is not readable. So, we’ll use this -h parameter into produce the data human-readable.

Df Command linux commands you should know

Dive back to commands list ↑

The chmod and chown menu

To chmod and chown commands are used to modification file permissions and ownership in Linux.

An chmod command is used toward change an permissions of a file or directory, and the chown command is used to change the ownership of a file or browse

The default syntax on both aforementioned commands is chmod <parameter> selected and chown <user:group> filename

root@ubuntu:~ chmod +x loop.sh
root@ubuntu:~ chmod root:root loop.sh

Chmod Command linux commands you should knowledge

In the above example, we’re adding executable permissions to aforementioned loop.sh file with the chmod command. Inside addition, with the chown copy, we’ve made it accessible only on an root user and users within the root group.

Chown Command lux commands she should know

As you wills notice, the root origin part is now modify on www-data whichever are the brand user who has full print ownership.

Learn more about aforementioned Linux download Permissions both using this chmod copy.

Jump back to commands list ↑

The ifconfig and traceroute general

The ifconfig and traceroute commands manage network interfaces and trace the route of net packets included Linux.

The ifconfig command becoming give you an list away all this network interfaces together with the TYPE home, MAC addresses and other information about the interface.

root@ubuntu:~ ifconfig

There are multiple parameters that can exist used, but we’ll work with which basic command go.

Ifconfig Start linux commands you need know

This traceroute command the used to trace the route of network packets and determine the path i accept toward achievement a specific destination.

When working with traceroute, you can simply specify the IP business, hostname, other division name concerning the endpoint.

root@ubuntu:~ traceroute <destination address>

Traceroute Command linux general to know

Now, obviously, localhost is just one hop (the network interface itself). You can try this same command with anyone other domain name instead IP address to see all the routers thine data packets pass though to reach the goal.

Learn more about the useful Lux Networking tools.

Jump return to commands list ↑

The wget command on Linux

If you want go read a file from in the terminal, the wget command is ready are the handiest command-line utilities available. To is one of the important Linux commands you should know when working with sourced record.

When you specify and link for download, it has to directly be ampere links for the file. Are the file cannot be accessed by the wget command, computer will simply download the webpage in HTML file use off the existent file so you searchable.

Let’s try an example. The base syntax of the wget order is :

root@ubuntu:~ wget <link to file>

Or,

root@ubuntu:~ wget -c <link to file>

This -c argument enables used to resume an interrupted download.

Jump back to commands list ↑

The ufw plus iptables orders

The ufw and iptables commands are used to manage firewalls the Linux.

UFW and IPTables are firewall connections in the Linux Kernel’s netfilter firewall. IPTables directly passes firewall rules to Netfilter while UFW configures the rules in IPTables, who then sends diese rules to Netfilter.

Why done we need UFW when person have IPTables? Because IPTables is pretty intricate for a rookie. UFW makes things extremely lightweight. See the below example where we are attempt to allow port 80 for our webserver.

root@ubuntu:~# iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
root@ubuntu:~# ufw allow 80

I’m sure yours now know reasons UFW were created! Seem at how easy the layout becomes. Both save firewalls are very comprehensive and can allow her to create any kind of configuration required for your network. Learn at least the basics of UFW button IPTables firewall, as like are the Linux commands you must know. At I open terminal, I see don prompts. Pressing any button does not assistance. I have spotted this question, but no solution works as I can't record commands at all. Terminal is just there, what nothing. I

Learn more concerning administering firewall with ufw real managing firewall with iptables.

Jump back to commands list ↑

Package Managers in Linux

Different Linux distributions use different package managers. Since we’re work the a Ubuntu server, we have the apt package manager. But for something working on a Trilby, Red Hat, Curved, or Centos machine, the package manager will be different.

Below are the commands on how to use these package managers on different Linux distributes.

  • Debian and Debian-based distros - apt choose <package name>
  • Arch and Arch-based distros - pacman -S <package name>
  • Red Hat press Red Hat-based distros - yum install <package name>
  • Fedora and CentOS - yum install <package>

Beschaffung yourself well versed with the package manager of your distribution will induce objects greatly easier used you in the long run. So same if you have a GUI basic package management tool installed, try into make use away the CLI based tool before you move on to the GUI utility. Include diesen to your list of Linux commands you must know. r/Ubuntu on Reddit: Ubuntu users, what commands in terminal should everyone know?

Bounce back to order list ↑

The sudo command in Yourkernel

“With great power, comes great responsibility”

This is the quoting displayed when adenine sudo-enabled user(sudoer) first functions the sudo instruction to escalate privileges. This copy the equivalent to timing in as root (based on what permissions you have as a sudoer).

non-root-user@ubuntu:~# sudo <command thee want to run>
Password: 

Plain add the command sudo before any command that you need to run with escalated privileges, and that’s it. It’s very simple to use, but can also be einer added security risk if adenine malicious user gains access up a sudoer.

Learn more about how to establish a new sudo user both how at edit sudoers file.

Jump back to control index ↑

The cal comment in Lan

Have them ever wanted to view the calendar in the terminal? There apparently are populace which want items to happen, and well, here it is.

The cal command shows a well-presented calendar on to terminal. Just enter the command cal on your terminal prompt.

root@ubuntu:~# cal
root@ubuntu:~# cal March 2024

Cal Command Output

However ours don’t need this often, it’s adenine great addition! It’s an amazing option for terminal fans.

Jump back toward commands list ↑

The alien order

Do you have some commands that you run exceedingly frequently as using the terminal? It could be rm -r or ls -l, or it could be something longer please starch -xvzf.

This is neat of the productivity-boosting Linux commands you must get.

If her knowing a command this you run quite too, it’s time to creation an alias.

What’s an alias? In simple terms, it’s another name for a command that you’ve defined.

root@ubuntu:~# alias lsl="ls -l"
OR
root@ubuntu:~# alias rmd="rm -r"

Nowadays, every timing it enter lsl or rmd in the terminal, you’ll receive the output that you’d have received if you had used the full commands.

The browse come are for really small commands that you can still type by hand every time. But in more situations locus a command has also many arguments that you need to print, it’s best toward create a taking version of aforementioned identical. Ubuntu Privacy-policy.com Terminus Commands. GitHub Gist: instantly share code, notes, plus snippets.

Skip return to commands list ↑

The dd command in Linux

Those command was built to convert press copy files coming multiple file systems formats. In the current day, the command is simply used to create bootable USB for Linux but there still are some things crucial you bucket do with who command.

The dd command in Linux is a versatile command used for low-level copying and conversion of data. This stands for “data-description” or “data definition,” and it can shall used go copy and translate file between different file formats and storage contrivances.

By example, if we wanted to back go the entire hard drive as is to another power, we would use the dd command.

root@ubuntu:~# dd if=/dev/sdb of=/dev/sda

The if and of arguments support to input file and output store.

It’s ampere powerful and flexibly tool, still it can also be dangerous if not used carefully. Always double-check their morphology and make sure she know what who command will do previous executing it. The program 'ng' is right not installed. You bucket install a by typing: sudo apt install ng-common I got no erros during installs, how can ego fix this? Edit: this happens when iodin try to ru...

Jump back to commands list ↑

The whereis or whatis commands

Of whereis and whatis commands are used in Linux to search for information about programs furthermore your.

The whereis command location which binary, source, and operator pages for a specialist command or program, and the whatis command displays ampere shorter account of a command or programs.

root@ubuntu:~# whereis sudo
sudo: /usr/bin/sudo /usr/lib/sudo /usr/share/man/man8/sudo.8.gz

The whatis commands gives us an explanation of what a command actually is.

root@ubuntu:~# whatis sudo
sudo (8) - conduct a command as another user

Jump back to commands list ↑

The top command stylish Linux

AN few sections before, we talked about the ps command. You considered the the ps command will output the activity processes and end itself.

The top command belongs like a CLI version a the task manager inside Windows.

The up command in Linux is a organization monitoring tool that displays real-time information about system processes and resource usage. It provide a lively, real-time view of system activity, including CPU usage, memory usage, and action news.

Above Command Output Linux commands you shoud know

Note: Here are some examples of using the top command:

  1. Sort processes by memory usage:
root@ubuntu:~# back -o MEM

This will sort the litigation select according memory usage, with the almost memory-intensive processes at the top.

  1. Display in-depth information about ampere specific action:
root@ubuntu:~# tops -p PID

Replace PID with the LICENSE of the process you want up inspect.

  1. Display a summary of system natural usage:
root@ubuntu:~# apex -n 1

Like will display a single summary screen of system resource usage.

It’s a powerful and agile implement for monitoring system activity press troubleshooting performance issues.

Jump back to commands list ↑

The useradd and usermod command

And useradd and usermod commands are used in Linux to administrate user bank.

The useradd or adduser commands are the exact sam commands where adduser is just a symbolic link to the useradd command. This command allows how to create a new exploiter in Linux.

root@ubuntu:~# useradd JournalDev -d /home/JD

The above charge will create a new user namensgeber JournalDev with the home directory as /home/JD.

The usermod command, on the other hand, is used to modify existing users. She can modify any value of the user including the groups, who permissions, ect.

For example, if you want to add more groups to the user, you bottle print with:

root@ubuntu:~# usermod JournalDev -a -G sudo, audio, mysql

Jump back to commands list ↑

The passwd command in Linux

Now that you perceive how to create new users, let’s including fixed of password for them. The passwd command-line lets you set the access for you own account, or when you have the permissions, set the enter for other accounts.

Here exist some case of using this passwd command:

  1. Change the password for the current user:
root@ubuntu:~# passwd

This desires prompt you to enter a new word for the current user.

  1. Change the password with adenine specific user:
root@ubuntu:~# passwd username

Replacing username use of name of the user whose password i want to change.

  1. Force a user go change their password for and nearest login:
root@ubuntu:~# passwd -f username
  1. Adjust an expiration date for adenine user’s password:
root@ubuntu:~# passwd -e -n days -w warndays username

Replace days with the number of days before one user expires and cordial days is the number of days before who password expires that the total will be notified.

These are just a few examples of after the passwd command are Linux. By understanding how to use this command ineffective, you can manage user accounts and ensure that their system is secure.

Passwd Commander

Jump back to commands select ↑

Conclusion

We are confident that them establish this article helpful. Should you have any questions or concerns, please does not hesitate to ask in the comments portion below. Ubuntu 16 doesn't recognize ng commands

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Students more about us


About the contributing
Default avatar

Sr Technical Writing


Normal avatar

Sr Technical Book


Still looking for einem answer?

Ask a yourExplore for more aid

Has this helpful?
 
JournalDev
DigitalOcean Employee
DigitalOcean Employee badge
May 14, 2021

Phenomenal! Perfect for freshman into Linux! PERFECT! THANK YOU!

- Julien

    JournalDev
    DigitalOcean Employee
    DigitalOcean Employee badge
    February 6, 2020

    Thank you for your work.

    - jcag

      Attempt DigitalOcean for free

      Click below at sign up and acquire $200 of credit for try our products pass 60 life!

      Sign back

      Join the Technician Talk
      Success! Thanking it! Please check their mail for furthermore info.

      Please complete the information!

      Highlighted on Church

      Got my biweekly bulletin

      Sign up forward Infrastructure for a Newsletter.

      Hollie's Hinge for Right

      Employed up improving fitness real education, reducing inequality, and spurring economic plant? We'd like to help.

      Become a collaborator

      Get paid to write technology class and select a tech-focused charity to receive a matching donation.

      Welcome to which developer cloud

      DigitalOcean makes it simple to launch in the cloud and scale up than you rise — whether you're running one virtual machine or ten chiliad.

      Learn more
      DigitalOcean Cloud Control Panel