alias command in Linux with examples

alias command in Linux with examples

Alias command  is an extremely useful tool. You’ve probably noticed that, in the Linux command line, you have to do a lot of typing. And sometimes, this can pose some problems as it is very easy to make mistakes while typing. A very common typo that many users make in the Linux command line terminal is sl instead of ls. This can be quite annoying as you will have to retype the entire command. Linux is designed to be fast, convenient, and efficient, so when things don’t exactly play out that way, it can result in a decent amount of frustration.

Read more

export command in Linux with examples

export command in Linux with examples

The export command in Linux is used to set an environment variable. Environment variables are part of the Linux system shell that contain changing values. They help facilitate scripts and system programs, so that code can accommodate a variety of scenarios. Unlike regular shell variables, environment variables can be accessed system-wide, by any user or process.

Read more

fold command in Linux with examples

fold command in Linux with examples

The fold command in Linux is used to wrap the lines of a file at a predetermined length. Its original use was to facilitate the viewing of large files on a terminal screen, and having each line be wrapped at a certain length so everything could fit on the monitor. Back in the 1970s, before terminals and applications had word wrap functionality by default, this was very handy.

Read more

nl command in Linux with examples

nl command in Linux with examples

The nl command in Linux is an abbreviation for number lines. If you’ve ever had a large text document and needed to add line numbers to it, the nl command is your saving grace. Rather than going through the painstaking process of numbering each line manually, or importing your text document into a GUI text editor, you can simply use nl from the command line and be done in a matter of seconds.

Read more

cp command in Linux with examples

cp command in Linux with examples

One of the most basic commands in Linux is the cp or copy command. The most basic way to use this command is to copy a file or multiple files. The cp command is one of the first commands you should learn as a newcomer to Linux, as copying files and directories is something you’ll do often.

Read more

mv command in Linux with examples

mv command in Linux with examples

The mv command in Linux is short for move. As you can probably guess or may already know, the command is used to move files and directories from one location to the other. Users that are more accustomed to a GUI might know this action better as “cutting and pasting.” The mv command is just the command line equivalent of that action.

Read more

logrotate command in Linux with examples

logrotate command in Linux with examples

In Linux, many applications and system services will store log files. These log files give a Linux administrator insight into how their system is performing, and are invaluable when troubleshooting issues. However, log files can get unwieldy very quickly. For example, if your web server software logs every visit to your website, and you get thousands of viewers per day, there will be way too much information to feasibly squeeze into one text file.

Read more