×

This article covers how to use the pwd command in Linux. In fact, pwd Linux command is mainly used for printing the name of the current working directory. Examples of printing the current working directory, avoiding symlinks and how to get the current working directory in shell scripts.



This article covers steps to install and configure Git on a Debian 10 server. As one of the most popular version control systems currently available, Git is a common choice among open-source and other collaborative software projects. Many project's files are maintained in a Git repository, and sites like GitHub, GitLab, and Bitbucket help to facilitate software development project sharing and collaboration.


How to install Git on Debian / Ubuntu Linux System ?

1. Use the apt package management tools to update your local package index and then download and install Git:

$ sudo apt update
$ sudo apt install git

2. You can confirm that you have installed Git correctly by running the following command:

$ git --version



This article covers how to use the hwinfo command in Linux. hwinfo command reports information about CPU, RAM, keyboard, mouse, graphics card, sound, storage, network interface, disk, partition, bios, and bridge, etc,.


The hwinfo utility displays the following information:

  • CPU : manufacturer, model, frequency
  • Motherboard : manufacturer, model, BIOS version, on-board controller
  • RAM : RAM size, RAM type (FP, EDO, SDRAM, DDRAM)
  • Hard disk controller : SCSI, IDE, on-board/card, model, BIOS version, chipset
  • Hard disks : type, manufacturer, model, size, bus system (SCSI, IDE), partitioning
  • CD-ROM drives : type, manufacturer, model, speed, internal/external, parallel port?
  • Other media : CD writer, streamer (model, manufacturer, SCSI/EIDE/floppy streamer, capacity), ZIP drives, Jaz drives, MO drives, flopticals
  • Graphics card : model, manufacturer, chipset, memory (DRAM, VRAM), memory size
  • Other peripherals : printer, parallel ports, serial ports, modem, ISDN card



This article covers how to use the pkill command in Linux. pkill is basicity a wrapper around the pgrep program that only prints a list of matching processes.

The syntax for the pkill command is as follows:

$ pkill [OPTIONS] <PATTERN>

The matching <PATTERN> is specified using extended regular expressions.

For more information about pkill command, visit the pkill man page or type man pkill in your terminal.


Other Linux commands:

  • ps — Report the status of a process or processes.
  • killall — Kill processes by name.
  • kill — Send a signal to a process, affecting its behavior or killing it.



This article covers how to Install putty on CentOS 8. With putty, you can easily connect your Linux system to a remote system. Putty is a free and open source ssh & telnet client. Putty is available for Windows, Linux, Unix and macOS. Using putty, we can access the remote servers and switches over ssh protocol. It can also be used to take serial console of remote systems.


How to perform Putty Installation on CentOS / RHEL / Fedora ?

Putty package is available in the default CentOS and RHEL repositories. So, to install putty run:

$ sudo yum install putty -y

Or

$ sudo dnfs install putty -y



This article covers some useful Linux commands to help you get started with working efficiently with Linux system. When operating a Linux OS, you need to use a shell — an interface that gives you access to the operating system’s services. Most Linux distributions use a graphic user interface (GUI) as their shell, mainly to provide ease of use for their users.

That being said, it's recommended to use a command-line interface (CLI) because it’s more powerful and effective. Tasks that require a multi-step process through GUI can be done in a matter of seconds by typing commands into the CLI.


How to use the cd command in Linux ?

To navigate through the Linux files and directories, use the cd command. It requires either the full path or the name of the directory, depending on the current working directory that you're in.

There are some shortcuts to help you navigate quickly:

  • cd .. (with two dots) to move one directory up.
  • cd to go straight to the home folder.
  • cd- (with a hyphen) to move to your previous directory.


How does the ls command works ?

The ls command is used to view the contents of a directory. By default, this command will display the contents of your current working directory.

There are variations you can use with the ls command:

  • ls -R will list all the files in the sub-directories as well.
  • ls -a will show the hidden files.
  • ls -al will list the files and directories with detailed information like the permissions, size, owner, etc.



This article covers most used Nginx commands. You can learn more about Nginx command line at Nginx documentation.

Nginx is one of the most popular web servers in the world. So whether you're currently using it or not, chances are, if you're a web developer chances are you'll likely come in contact with it at some point. 

Also, Nginx is well known for its simple configuration, and low resource consumption due to its high performance, it is being used to power several high-traffic sites on the web, such as GitHub, SoundCloud, Dropbox, Netflix, WordPress and many others.


To start the Nginx service, run the following command. Note that this process may fail if the configuration syntax is not OK:

$ sudo systemctl start nginx #systemd

OR

$ sudo service nginx start   #sysvinit


To enable Nginx auto-start at boot time, run the following command:

$ sudo systemctl enable nginx #systemd

OR

$ sudo service nginx enable   #sysv init


How to Show Nginx Command Help ?

To get an easy reference guide of all Nginx commands and options, use following command.

$ systemctl -h nginx



This article covers how to use the Linux cat command. Cat(concatenate) command is very frequently used in Linux. It reads data from the file and gives their content as output. It helps us to create, view, concatenate files.

If you want to add a bit of new text to an existing text file, you use the cat command to do it directly from the command line (instead of opening it in a text editor).

Type the cat command followed by the double output redirection symbol ( >> ) and the name of the file you want to add text to.



This article covers how to Remove Files and Directories Using Linux Command.

The procedure to remove all files from a directory:

  • Open the terminal application.
  • To delete everything in a directory run: rm /path/to/dir/* .
  • To remove all sub-directories and files: rm -r /path/to/dir/* .



This article covers how to use of shutdown command in Linux with different arguments. Learn more by visit the shutdown man page.

On Unix-like operating systems, the shutdown command shuts down or reboots the system.

The shutdown command brings the system down in a secure way. All logged-in users are notified that the system is going down, and login operations are blocked. It is possible to shut the system down immediately, or after a specified delay.

All processes are first notified that the system is going down by the signal SIGTERM. This gives programs like vi time to save the file being edited, mail and news processing programs a chance to exit cleanly, etc.


Good Linux commands:

  • halt — Stop the computer.
  • poweroff — Stop the computer.
  • reboot — Stop the computer.
  • wall — Send a message to all logged-in users.



This article covers different wget command for different operations along with options. Wget is a command line utility in linux to download files from the internet. It provides many features such as downloading multiple files, resuming stopped downloads, limiting the bandwidth, downloading in the background and can be used for taking mirrors of the site. Wget supports HTTP, HTTPS and FTP protocol to connect server and download files.

You can learn more about Wget visit the GNU wget Manual page.


How to Install wget on Ubuntu | Debian ?

If your operating system is Ubuntu, or another Debian-based Linux distribution which uses APT for package management, you can install wget with apt-get:

$ sudo apt-get install wget



This article covers how you can easily change the sudo password timeout by adding a single entry in the sudoers file. If you are using Vi instead of Nano, follow the instructions described here.
You use sudo for some command in the terminal, it asks for the password.

You enter the password, the command runs.
For the subsequent commands, even if they need superuser privileges, you don't need to enter the password again.
After a certain amount of time, when you try to use sudo, it asks for the password again.
It happens because there is a default timeout in Ubuntu and other Linux system for Sudo. In Ubuntu, this default sudo timeout is 15 minutes.
If you think 15 minute is too short or too long you can even change the sudo password timeout in Ubuntu.

To Change sudo password timeout in Ubuntu:
1. Open a terminal (Ctrl+Alt+T) and use the following command:

$ sudo visudo

It will open a file in nano text editor that contains some settings related to sudo.
In here look for the following line:

Defaults        env_reset

Replace above line with this one:

Defaults        env_reset, timestamp_timeout=XX

Where XX is the new timeout value in minutes.
Of course you have to replace the XX with the desired timeout value.
2. Once you are done changing the default sudo password timeout, use Ctrl+X to exit the editor.
It will give you option to save or cancel the changes.

Use Y to save the changes.



This article covers how you can install Putty on your Ubuntu OS. Now you can use your Putty SSH client on Linux to connect to remote systems. For more help regarding Putty, visit its user manual.


PuTTY is a popular terminal emulator for Windows, but it is not only limited to Windows operating system. 

Being free and open source, it is popular among Linux users too. PuTTY supports a wide range of protocols such as serial, SSH, Telnet, rlogin, SCP, SFTP etc. 

Sysadmins generally use PuTTY as an SSH and telnet client whereas the Maker community widely uses PuTTY for interfacing with the serial ports on their hardware. 

PuTTY ships with a command line tool named "psftp", the PuTTY SFTP client, which is used to securely transfer files between computers over an SSH connection. 


To install PuTTY on Ubuntu:

1. In order to install Putty, you will need to ensure that the Universe repository is enabled on your Ubuntu system. If it is not already enabled, you can enable it by using the following command in Terminal:

$ sudo add-apt-repository universe

When prompted for the password, enter the sudo password.

2. After enabling the Universe repository, now you can install Putty on your system. Issue the following command in Terminal in order to do so:

$ sudo apt install putty

When prompted for the password, enter the sudo password.



This article will guide you on how to install MariaDB on your CentOS 8 system. Now you can create new databases and grant privileges to other database users. Also, you can add users and create new databases for web or desktop applications which will be written in PHP, Python, and so on.

In MariaDB replication is faster whereas in MySQL replication is slower. 

MariaDB is Open Source whereas MySQL uses some proprietary code in its Enterprise Edition. 

MariaDB doesn't support Data Masking and Dynamic column while MySQL supports it. Comparatively MariaDB is faster than MySQL.


To uninstall MariaDB and install mysql:

1. Purge mariadb sudo apt purge mariadb-* Remove all databases ('Yes' answer)

2. Purge mysql sudo apt purge mysql-*

3. Remove folders: sudo rm -r /usr/share/mysql/ sudo rm -r /etc/mysql/ sudo rm -r /lib/systemd/system/mysql.service.

4. Now you can try to install oracle mysql: sudo apt install mysql-server.



It is vital for you to check if your Linux memory is running low to help your server to stay optimized.




More Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on IbmiMedia.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com