Skip to Content
Author's profile photo Bill Ramos

Linux Challenged? No Problem – Check out the Linux essentials for the Windows admin

Linux challenged? We are a Windows shop and run SQL Server and Oracle on Windows, so getting used to Lunix has been a challenge for us. What’s worse is we are GUI oriented, so even the command line on Windows Server is foreign – but no matter.  To help the team get up to speed on Linux and running HANA on AWS, I’ve compiled a list of “essential” commands that we are using to keep tabs on the system .Use of # means that this is what is typed in at the Linux command line. Commands are shown in Courier font with specific objects shown in italics.

For quick help for commands, type in –help after the command name.  Example:

# ls –help

For detailed help on a command, type in man (for manual) before the command. Example:

# man ps

Note, for man pages, type q to quit.

For the command tables below, Linux commands are is case sensitive.

File system commands


List files – like the DOS DIR command

-l option shows detail list

-al option shows list with hidden items

-lS option shows files orders by file size in descending order


Output the last 10 lines of the file

-f option outputs the contents of the file as it grows


Output the first 10 lines of the file


Outputs a file – one page at a time


Outputs a file with no paging


Deletes a file or more

-r option deletes a directory


Copies a file to another, example cp file1 file2

Process Management


Display user’s currently active processes


Displays all running processes – like Windows task manager

kill pid

Kills the process id pid that is displayed in top

System Info


Switch user – for performing operations on HANA, you need to run

# su -l hdbadm

This will set up all the environment information and paths to HANA binaries


Shows disk information along with free space

-h option displays values in readable format. Developer HANA on AWS uses /dev/md0 – mounted on /sap – make sure this doesn’t get above 80%


Shows memory and swap usage

cat /proc/cpuinfo

Shows CPU information for each processor

cat /proc/meminfo

Shows memory information

cat /proc/mdstat

Shows information about the make-up of RAID drives. For the HANA developer on AWS, you’ll see that the six EBS drives are configured as RAID0.


Manage MD devices – aka RAID drives. Use the following command to display the status of the main HANA drive. You’ll need to run this as the root user.

# mdadm –detail /dev/md0

Quick and Dirty SAP HANA commands

# su -l hdmadm

# ./HDB stop

# ./HDB start

Stops and starts the HANA instance. See my blog on why you should stop the HANA instance before stopping the HANA machine on AWS –

# hdbsql

HANA SQL command line – this is just like SQL Server’s SQLCMD. Documentation is located in Chapter 18 of the hana_admin_en.pdf –


# ls -ltc | more

Change directory to the HANA instance trace directory and list the trace files in descending changed date order with a pause using the more command.

# cd $DIR_INSTANCE/exe/python_support

# python

Collect the HANA instance diagnostic trace files so that you can analyze them on your Windows machine 🙂 See chapter 16.6 in hana_admin_en.pdf –

This is useful when we are running workloads that end up crashing the HANA instance.

Now, for my minor annoyances with SAP HANA. SAP – please create man pages for HANA commands. For example, there is no man page for the hdbsql command, and I find myself having to refer back to the hana_admin_en.pdf file all the time. 🙁

Next time – how to use grep for looking for problems in the trace files with HANA Studio can’t connect to the instance.

Also, if you have favorite Linux commands that you find useful for working with HANA, please suggest them via a comment to this blog and I’ll update this post to track them.

If you like this blog post and would like to see more – please rate and like the article. 😉 Also, feel free to follow me on Twitter @billramo

Have a Happy New Year!

Bill Ramos

Database Architect

Advaiya Inc.

Assigned tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Martin English
      Martin English

      Hi Bill,

        Google is your friend -

      The simplest one I found, it's on the first page:) is


      Author's profile photo Bill Ramos
      Bill Ramos
      Blog Post Author

      Hi Martin,

         Thanks for the links on how to create man pages. Now the trick is to get the SAP HANA documentation to add them as part of the basic HANA install on AWS and appliance 🙂

      Looks like the HDB command is yet another example SAP not providing a man page.



      Author's profile photo Lars Breddemann
      Lars Breddemann

      Hi Bill,

      why don't you use the command line help of hdbsql?

      It's really all in there and since hdbsql is available on multiple platforms including Windows providing man-pages is probably not so handy.



      Author's profile photo Bill Ramos
      Bill Ramos
      Blog Post Author

      Hi Lars,

          I actually do use hdbsql --help quite a bit 🙂 I just got accustom to finding man pages on other Linux binaries - why not for the SAP HANA ones?



      Author's profile photo Vishal Soni
      Vishal Soni

      In case granting permissions to files is a frequent task, the 'CHMOD' command can be useful.

      'FIND' is often useful command for finding files across the system.

      And for easy working with big sized text files, vi editor can be useful. 🙂