Install Dev C++ Ubuntu Command Line

-->

  1. Ubuntu Install Dev Tools
  2. Ubuntu Command Line Tutorial
  3. Ubuntu Command Line Install
  4. Ubuntu Command Line Install

APPLIES TO: SQL Server (Linux only) Azure SQL Database Azure Synapse Analytics (SQL DW) Parallel Data Warehouse

The following steps install the command-line tools, Microsoft ODBC drivers, and their dependencies. The mssql-tools package contains:

  • sqlcmd: Command-line query utility.
  • bcp: Bulk import-export utility.

Dec 01, 2018  In this blog post I will show you how to install C/C programming language on ubuntu or kali linux. Introduction C C is a procedural programming language. It was initially developed by Dennis Ritchie between 1969 and 1973. The main features of C language include low-level access to memory, simple set of keywords, and. May 23, 2017  how to run c program in linux terminal how to compile c program in ubuntu how to compile c program in linux using gcc command to run c program in linux how to run a c program in terminal mac how. Before you can build a C or C program on the command line, verify that the tools are installed, and you can access them from the command line. Visual C has complex requirements for the command-line environment to find the tools, headers, and libraries it uses.

Install the tools for your platform:

This article describes how to install the command-line tools. If you are looking for examples of how to use sqlcmd or bcp, see the links at the end of this topic.

Install tools on RHEL 7

Use the following steps to install the mssql-tools on Red Hat Enterprise Linux.

  1. Enter superuser mode.

  2. Download the Microsoft Red Hat repository configuration file.

  3. Exit superuser mode.

  4. If you had a previous version of mssql-tools installed, remove any older unixODBC packages.

  5. Run the following commands to install mssql-tools with the unixODBC developer package.

    Note

    To update to the latest version of mssql-tools run the following commands:

  6. Optional: Add /opt/mssql-tools/bin/ to your PATH environment variable in a bash shell.

    To make sqlcmd/bcp accessible from the bash shell for login sessions, modify your PATH in the ~/.bash_profile file with the following command:

    To make sqlcmd/bcp accessible from the bash shell for interactive/non-login sessions, modify the PATH in the ~/.bashrc file with the following command:

Install tools on Ubuntu 16.04

Use the following steps to install the mssql-tools on Ubuntu.

Note

Ubuntu 18.04 is supported starting with SQL Server 2019 CU3. If you are using Ubuntu 18.04, change the repository path from /ubuntu/16.04 to /ubuntu/18.04.

  1. Import the public repository GPG keys.

  2. Register the Microsoft Ubuntu repository.

  3. Update the sources list and run the installation command with the unixODBC developer package.

    Note

    To update to the latest version of mssql-tools run the following commands:

  4. Optional: Add /opt/mssql-tools/bin/ to your PATH environment variable in a bash shell.

    To make sqlcmd/bcp accessible from the bash shell for login sessions, modify your PATH in the ~/.bash_profile file with the following command:

    To make sqlcmd/bcp accessible from the bash shell for interactive/non-login sessions, modify the PATH in the ~/.bashrc file with the following command:

Install tools on SLES 12

Use the following steps to install the mssql-tools on SUSE Linux Enterprise Server.

  1. Add the Microsoft SQL Server repository to Zypper.

  2. Install mssql-tools with the unixODBC developer package.

    Note

    To update to the latest version of mssql-tools run the following commands:

  3. Optional: Add /opt/mssql-tools/bin/ to your PATH environment variable in a bash shell.

    To make sqlcmd/bcp accessible from the bash shell for login sessions, modify your PATH in the ~/.bash_profile file with the following command:

    To make sqlcmd/bcp accessible from the bash shell for interactive/non-login sessions, modify the PATH in the ~/.bashrc file with the following command:

Line

Install tools on macOS

A preview of sqlcmd and bcp is now available on macOS. For more information, see the announcement.

Install Homebrew if you don't have it already:

To install the tools for Mac El Capitan and Sierra, use the following commands:

Docker

If you run SQL Server in a Docker container, the SQL Server command-line tools are already included in the SQL Server Linux container image. If you attach to a running container with an interactive bash shell, you can run the tools locally.

Offline installation

If your Linux machine does not have access to the online repositories used in the previous sections, you can download the package files directly. These packages are located in the Microsoft repository, https://packages.microsoft.com.

Tip

If you successfully installed with the steps in the previous sections, you do not need to download or manually install the package(s) below. This is only for the offline scenario.

  1. First, locate and copy the mssql-tools package for your Linux distribution:

    Linux distributionmssql-tools package location
    Red Hathttps://packages.microsoft.com/rhel/7.3/prod
    SLEShttps://packages.microsoft.com/sles/12/prod
    Ubuntu 16.04https://packages.microsoft.com/ubuntu/16.04/prod/pool/main/m/mssql-tools
  2. Also locate and copy the msodbcsql package, which is a dependency. The msodbcsql package also has a dependency on either unixODBC-devel (Red Hat and SLES) or unixodbc-dev (Ubuntu). The location of the msodbcsql packages are listed in the following table:

    Linux distributionODBC packages location
    Red Hathttps://packages.microsoft.com/rhel/7.3/prod
    SLEShttps://packages.microsoft.com/sles/12/prod
    Ubuntu 16.04msodbcsql
    unixodbc-dev
  3. Move the downloaded packages to your Linux machine. If you used a different machine to download the packages, one way to move the packages to your Linux machine is with the scp command.

  4. Install the and packages: Install the mssql-tools and msodbc packages. If you get any dependency errors, ignore them until the next step.

    PlatformPackage install commands
    Red Hatsudo yum localinstall msodbcsql-<version>.rpm
    sudo yum localinstall mssql-tools-<version>.rpm
    SLESsudo zypper install msodbcsql-<version>.rpm
    sudo zypper install mssql-tools-<version>.rpm
    Ubuntusudo dpkg -i msodbcsql_<version>.deb
    sudo dpkg -i mssql-tools_<version>.deb
  5. Resolve missing dependencies: You might have missing dependencies at this point. If not, you can skip this step. In some cases, you must manually locate and install these dependencies.

    For RPM packages, you can inspect the required dependencies with the following commands:

    For Debian packages, if you have access to approved repositories containing those dependencies, the easiest solution is to use the apt-get command:

    Note

    This command completes the installation of the SQL Server packages as well.

    If this does not work for your Debian package, you can inspect the required dependencies with the following commands:

Next steps

For an example of how to use sqlcmd to connect to SQL Server and create a database, see one of the following quickstarts:

For an example of how to use bcp to bulk import and export data, see Bulk copy data to SQL Server on Linux.

A lot of web based projects allow the upload of files from unknown sources, specially those apps that are public (available widely on the internet). Those files end up in the server, but nobody verifies whether the file is malicious or not. If you are willing to scan those files with an antivirus in Ubuntu, we recommend you the open source ClamAV antivirus. ClamAV® is an open source (GPL) anti-virus engine used in a variety of situations including email scanning, web scanning, and end point security. It provides a number of utilities including a flexible and scalable multi-threaded daemon, a command line scanner and an advanced tool for automatic database updates.

  • Command-line scanner
  • Milter interface for sendmail
  • Advanced database updater with support for scripted updates and digital signatures
  • Virus database updated multiple times per day
  • Built-in support for all standard mail file formats
  • Built-in support for various archive formats, including Zip, RAR, Dmg, Tar, Gzip, Bzip2, OLE2, Cabinet, CHM, BinHex, SIS and others
  • Built-in support for ELF executables and Portable Executable files packed with UPX, FSG, Petite, NsPack, wwpack32, MEW, Upack and obfuscated with SUE, Y0da Cryptor and others
  • Built-in support for popular document formats including MS Office and MacOffice files, HTML, Flash, RTF and PDF

In this article, we will show you how install this antivirus in your Ubuntu 16.04 system and how to use it from the CLI.

Install ubuntu command line only

1. Install ClamAV

To install ClamAV proceed to update the package lists of your system with:

Then, proceed to install ClamAV with the following command:

Ubuntu Install Dev Tools

If you want to use the daemon as well, run the following command too:

Once the setup finishes, continue with the next step. For more information about this tool, please visit the official website here.

2. Update virus database

Once the antivirus has been installed, be sure to update the virus database with the following command:

This will start the update process of the database and it will took while depending on how old is your database:

Once this database has been updated, you are ready to get started with the scanning !

3. Scanning with the CLI

We will share with you the most used commands by the community and that we know, you may need often:

A. Scanning the whole system (verbose and non verbose)

Ubuntu Command Line Tutorial

Clamscan accepts as argument the path of the path to scan, so if you want to scan the entire system, provide the root directory as argument with the -r option that allows to scan subdirectories recursively as well:

Command

This will take a while until it starts to initialize and then it will print line by line the scanned files and the status (OK). At the end you will get a short summary:

B. Scanning the whole system with alarm

If you want a non verbose output and an alarm that only notifies if there are infected files on your system, use the --bell option to show the alarm on the -i option to display only the infected files:

C. Scanning the whole system (with alarm) except the sys dir

The sys directory is an interface to the kernel. Specifically, it provides a filesystem-like view of information and configuration settings that the kernel provides, much like /proc. Writing to these files may or may not write to the actual device, depending on the setting you're changing. It isn't only for managing devices, though that's a common use case. A lot of system admins may want to skip the directory, so just exclude it from the scan command with the --exclude-dir option:

D. Scanning multiple specific directories

You can scan multiple directories in the same command specifying a list with the directories (in a txt file):

Ubuntu Command Line Install

The content of specific_directories.txt will be in our case:

Ubuntu Command Line Install

You can simply change the content of the file with the directories that you want to scan and that's it. Remember that you can display all the options of the CLI tool with:

Don't forget as well to check the official website for more information about how to use this CLI tool.

Happy scaning !