What is Linux?

Linux commonly refers to an Operating System (OS). Microsoft Windows and Mac OS X are other well known examples. The Linux OS is made of two parts:

You can install GNU/Linux on your own computer; see this webpage for instructions.

Note: there are many flavours (or distributions) of Linux. For example: Debian, Ubuntu, Fedora, etc.

Why using Linux?

This OS presents several advantages:

The terminal window

Unlike Microsoft Windows for which every action is performed through menus and mouse clicks, Linux actions can (also) be obtained by typing commands in a special window called a terminal. This is the command line interface (CLI).

A Terminal Window

A Terminal Window

You can open a terminal window by typing [ALT-F2], followed by entering the command xterm (or x-terminal-emulator, aterm, wterm, lxterminal, rxvt, gnome-terminal, konsole), then [ENTER].

This gives you access to the SHELL, which is a program allowing users to execute basic commands. In the next section, you will learn some of them.

Several SHELL exist (e.g., sh, csh, ksh, bash). We will only consider bash, which is the standard command-line interpreter (or command processor) under Linux.

The Basic Commands

Your First Very Basic Commands

The command echo displays a line of text.

echo "Hello, world!"
## Hello, world!

We can display the SHELL used in this session. (Other SHELL exist like sh, csh, etc.)

echo $SHELL
## /bin/bash

Note: Some characters are special.

echo -e "New line\n"
echo -e "This is an antislash \\"
echo -e "To delete the previous character\b " # moves the "cursor" back one character 
echo -e "Hello" ; echo "Pierre"
echo -e "Hello\c" ; echo "Pierre"
echo -e "Two (horizontal) \t\t tabulations"
echo -e "and one vertical \v one"
echo -e "carriage return\r C" # moves the "cursor" to the begining of line 
echo -e "\f     form feed"
echo -e "\a     alert (BEL)"
echo -e "\0NNN  the character whose ASCII code is NNN (octal)"
echo -e "For example, when NNN=075, we get the \0075 sign (see http://www.asciitable.com)"
## New line
## 
## This is an antislash \
## To delete the previous character 
## Hello
## Pierre
## HelloPierre
## Two (horizontal)          tabulations
## and one vertical  one
## carriage return C
##      form feed
##      alert (BEL)
## 
## For example, when NNN=075, we get the = sign (see http://www.asciitable.com)

It is easy to display the current date (used by the computer) by typing the command date.

date
## Mon  1 May 06:20:24 CEST 2017

We can alter the display by adding some arguments, as below.

date +%F
## 2017-05-01

This instruction shows the system's host name.

hostname
## websiteprog.com

This command prints your user name.

whoami
## ddelseny

Exploring or Manipulating Files and Folders

Where am I?

pwd
## /home/ddelseny

We are in the subfolder ddelseny/ of the folder home/.

Now, let's create a new folder (i.e., a directory) called MyDir in the above directory.

mkdir MyDir

We can check that it exists using the file command.

file MyDir
## MyDir: directory

Let's go into this directory.

cd MyDir

We can check that we are in it.

pwd
## /home/ddelseny/MyDir

Note that the directory structure under Linux can be visualized as a tree. The topmost directory (the one containing all the others) is called the root directory and is noted /. Then, the path to any directory in the system is given either from the root directory (and is called an absolute path) or relatively to another directory (and is called a relative path). In this latter context, it is useful to use two special directories: the dot (.) directory which stands for the current directory, and the dot-dot (..) directory which stands for the parent directory.

cd .  # . is the current directory, so we stay where we were.
pwd
## /home/ddelseny/MyDir

Note:

# The carret symbol is used to add comments.
cd .. # .. is the parent directory; we go up one level.
pwd
## /home/ddelseny

The content of our newly created directory is empty. It is thus not surprising that the ls command outputs nothing.

ls MyDir/

But the root directory is not empty!

ls /
## bin
## boot
## dev
## etc
## figure
## home
## lib
## lib64
## lost+found
## media
## mnt
## opt
## proc
## root
## run
## sbin
## srv
## sys
## tmp
## usr
## var

Let's now create an (empty) file inside our MyDir/ directory.

cd MyDir
touch somefile
file somefile
## somefile: empty

Now, ls displays it.

ls
## somefile

We can make a copy of this file.

cp somefile mycopy
ls
## mycopy
## somefile

The tree tool might need to be installed first (through sudo apt-get install tree). More on this later.

tree
## .
## ├── mycopy
## └── somefile
## 
## 0 directories, 2 files

We can also use the find command to search on the whole system and find our file.

find ~ -name mycopy
## /home/ddelseny/MyDir/mycopy

Note: the ~ symbol stands for the home directory of the current user. It is also possible (and more convenient) to use the locate command, though this tool must first be installed on the system (using the instruction apt-get install locate) by a special user called root which has extended privileges). The locate command reads some database (prepared beforehand by sudo updatedb) and it is thus much faster than find.

locate mycopy
## /home/ddelseny/MyDir/mycopy

We can even create a file directly on the user's desktop.

cd ~/Desktop
touch anotherfile

You can check that the file "anotherfile" is apparent on your (graphical) desktop.

Hint: Typing cd alone brings you directly to your home directory (it is thus equivalent to cd ~).

The special character ">" enables one to put some contents in this empty file.

echo "Hello World!" > somefile

Get back to the MyDir/ directory first. The du command gives the space usage of the files in the current (i.e., MyDir) directory.

cd ~/MyDir
ls
du -a
## mycopy
## somefile
## 4    ./somefile
## 0    ./mycopy
## 8    .

We see that the dot (.) directory (and its content) weighs 8K, with 4K used by the directory itself.

Note: The dfcommand displays the disk space usage of all the partitions (see the Chapter on Linux installation) on the system.

df
## Filesystem     1K-blocks     Used Available Use% Mounted on
## /dev/root       20026236  9902400   9083504  53% /
## devtmpfs         1000060        0   1000060   0% /dev
## tmpfs            1000588        0   1000588   0% /dev/shm
## tmpfs            1000588   100708    899880  11% /run
## tmpfs               5120        0      5120   0% /run/lock
## tmpfs            1000588        0   1000588   0% /sys/fs/cgroup
## /dev/sda2      459913320 79622756 356905272  19% /home

We can now remove the first file that we created.

rm somefile
ls
## mycopy

And we can move (rename) the remaining file.

mv mycopy foo
ls
ls foo
# which is equivalent to 
ls ./foo
## foo
## foo
## ./foo

We now remove the last file in our folder.

rm foo

And we remove the (empty) directory.

cd ..
rmdir MyDir

Here is a recap of the previous commands, with a short description.

Command Description
touch With no argument, creates an empty file
cd Change directory
ls List files
pwd Print working directory
mkdir Make (i.e., create) a directory
rmdir Remove a directory
rm Remove files
cp Copy files
mv Move files
tree List contents of directories in a tree-like format
file Determine file type
find Search for files in a directory hierarchy
locate Find files by name (needs updatedb)
df Report file system disk space usage
du Estimate file space usage

Exercise: Display the content of the "/tmp" directory on your system. (This directory contains mostly files that are required temporarily.) Can you write some file inside this directory? Can you find the "passwd" file on your system? (It contains, among other things, the list of the users on the system.)

ls /tmp
touch /tmp/somefile
ls /tmp/somefile
find / -name passwd # The file to be found is: /etc/passwd

Accessing Content of Files

The cat command can be used to create a file.

cat > myfile.txt << EOF
123 456
abc def
EOF

It can also be used to display the content of a file. For example, try:

cat myfile.txt
## 123 456
## abc def

When the file is bigger that this small toy file, one can use head or tail to display the first or last lines of a file. Try for example:

head /proc/cpuinfo
tail /proc/cpuinfo
## processor    : 0
## vendor_id    : GenuineIntel
## cpu family   : 6
## model        : 22
## model name   : Intel(R) Celeron(R) CPU          220  @ 1.20GHz
## stepping : 1
## microcode    : 0x36
## cpu MHz      : 1200.083
## cache size   : 512 KB
## physical id  : 0
## fpu_exception    : yes
## cpuid level  : 10
## wp       : yes
## flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm lahf_lm dtherm
## bogomips : 2400.16
## clflush size : 64
## cache_alignment  : 64
## address sizes    : 36 bits physical, 48 bits virtual
## power management:

This file contains information about the CPUs of the computer.

Another command to display the content of a file, useful for example when its content cannot be displayed on one page, is more. It pages through text one screenful at a time (by typing the [Space bar]). Try:

more /proc/cpuinfo

An even more useful command is less, which does more than more. It is possible to scroll up or down through the text using the up and down arrows, or using the u or v keys. Moreover, less does not have to read the entire input file before starting, so it is fast with large input files. Try:

less /proc/cpuinfo
Command Description
cat Concatenate file(s), or standard input, to standard output
head Output the first part of files
tail Output the last part of files
more Paging through text one screenful at a time
less Similar to more, but with many more features
diff Compare files line by line
grep Print lines matching a pattern
tar Archiving utility
gzip Compress files
nano Text editor
vi/vim Text editor, suited for programming
emacs Very powerful text editor

Help

Command Description
apropos Seeks the manual pages for some name
info Read Info documents
man To display manual pages
help Display information for built-in shell commands

help cd for

Rights

Command Description
chmod Change file mode bits
chown Change file owner and group
stat Display file or file system status
groups Print the groups a user is in
passwd Change password of some user
id Print real and effective user and group IDs
su Change what user you are, or become root (Super User)
sudo Execute a command as another user (Super User do)
useradd Add a new user
userdel Deleter a user
groupadd Add a new group
groupdel Delete a group
gpasswd Create password for a group
chgrp Change group ownership
umask Set file mode creation mask

Files are also called "regular files" to distinguish them from "special files". The most common special file is the directory.

Use ls -l (list-long) to see the permissions of files. They will appear like this. (Note that I have added spaces between permissions to make it easier to read.)

Where: r = read, w = write, x = execute

  1. This number is the number of hard links (pointers) to this file. You can use ln to create another hard-link to the file.

  2. This is the type of file. '-' means a regular file, 'd' would mean a directory, 'l' would mean a link. There are also other types such as 'c' for character device and 'b' for block device (found in the /dev/ directory), and 'p' for pipes, 's' for sockets.

  3. These are the permissions for the owner of the file (the user who created the file).

  4. These are the permissions for the group, any users who belong is the same group as the user who created the file will have these permissions.

  5. These are the permissions for everyone else. Any user who is outside the group will have these permissions to the file.

The last entries at the end are the username, the group, the size, the creation date, and the name of the file respectively.

Note: Instead of '-' or of 'x', you may find 't' (for directories) or 'T' (for files). This is the sticky bit, obtained via the instruction chmod +t filename. Only the person who created the file within a directory may delete it, even if other people have write permission. Similarly, instead of '-' or 'x', you may find 's' (for directories) or 'S' (for files). Allow SUID/SGID (switch user ID/switch group ID) access.

chattr lsattr

Processes

Command Description
top Display Linux processes
ps Report a snapshot of the current processes
htop ??
kill Send a signal to a process
killall Kill processes by name
xkill Kill graphic windows
fuser Identify processes using files or sockets

A process can be thought of as a computer program in action; task and process are terms that Linux uses interchangeably.

When a command or the shell itself initiates (or spawns) a new subprocess to carry out a task, this is called forking. This new process is the child, and the process that forked it off is the parent. While the child process is doing its work, the parent process is still executing.

Internal (builtin) commands are executed directly by the SHELL. They do not correspond to any file on the disk.

type cd
type ls
which cd
which ls
## cd is a shell builtin
## ls is /bin/ls
## /bin/ls

PID of bash, of ps and of ls. The last two are external commands and as such are executed through a child process.

ps
ls -l /proc/self
##   PID TTY          TIME CMD
## 24368 ?        00:00:31 ccnet
## 24370 ?        00:09:23 seaf-daemon
## 25366 ?        00:00:03 R
## 25454 ?        00:00:00 sh
## 25455 ?        00:00:00 bash
## 25456 ?        00:00:00 ps
## 29231 ?        00:00:00 script-notify
## 29233 ?        00:00:00 inotifywait
## 29234 ?        00:00:21 script-notify
## lrwxrwxrwx 1 root root 0 Apr 15  2016 /proc/self -> 25455

Some commands (e.g. pwd) have a builtin as well as an external implementation:

type -a pwd
pwd
/bin/pwd

Bash redirections

By default, the input of a Linux command is read from a special file called the standard input (stdin), which is by default directly connected to the keyboard. Similarly, the normal output of a command is sent to a special file called the standard output (stdout), which is by default directly connected to the terminal screen. If an error occurs, it is sent to another special file called the standard error (stderr), which results in error messages output to the screen.

Note: There is a stdin, stdout, and a stderr associated with each command. These files live purely in memory.

In a Unix–like system such as Linux there is the concept of "everything is a file". That means, for example, your DVD Drive is a file (/dev/sdb1), your mouse is a file (/dev/input/mouse0) and so on.

Try, as root,

cat /dev/input/mice

and moves your mouse. Use [CTRL+C] to interrupt.

A terminal provides a way for applications to display output and to receive input through a terminal device. A tty (“tty”, short for “teletype”, or Terminal to TYpe text) is a native terminal device, the backend is either hardware or kernel emulated. The command tty print the file name of the terminal connected to standard input. When typed into a [CTRL+F1] hardware terminal, it will display /dev/tty1, say. When typed into a pseudo-terminal (pty), it will display /dev/pts/1, say. A pseudo-terminal is provided by a terminal emulator, which is an application (e.g., xterm, screen, tmux, sshd). A pts is the slave part of a pty.

So when you look to a "text window" on your linux system (under X11) you are looking to: a terminal emulator, connected to a virtual terminal, identified by a tty file, inside which runs a shell.

When xterm runs, it first initializes itself. Before running the user's shell, xterm opens the terminal device (/dev/pts/ or something similar) three times.

At this point, Bash inherits these three file descriptors, and each command (child process) run by Bash inherits them in turn, except when you redirect the command.

Each open file is defined by a single number (integer), called the file descriptor (fd). The first, fd 0 (stdin), is for reading. The other two (fd 1, stdout and fd 2, stderr) are for writing.

The open files are 0 (stdin), 1 (stdout), and 2 (stderr). 255 is a little trick that bash uses to keep a copy of these for when they are redirected. This is specific to bash.

ls -al /dev/stdin
ls -al /proc/self/fd/0
ls -al /dev/fd/0
## lrwxrwxrwx 1 root root 15 Apr 15  2016 /dev/stdin -> /proc/self/fd/0
## lr-x------ 1 ddelseny ddelseny 64 May  1 06:20 /proc/self/fd/0 -> /tmp/sh-thd-848134348 (deleted)
## lr-x------ 1 ddelseny ddelseny 64 May  1 06:20 /dev/fd/0 -> /tmp/sh-thd-848134348 (deleted)
ls -al /dev/stdout
ls -al /proc/self/fd/1
ls -al /dev/fd/1
## lrwxrwxrwx 1 root root 15 Apr 15  2016 /dev/stdout -> /proc/self/fd/1
## l-wx------ 1 ddelseny ddelseny 64 May  1 06:20 /proc/self/fd/1 -> pipe:[129025948]
## l-wx------ 1 ddelseny ddelseny 64 May  1 06:20 /dev/fd/1 -> pipe:[129025948]
ls -al /dev/stderr
ls -al /proc/self/fd/2
ls -al /dev/fd/2
## lrwxrwxrwx 1 root root 15 Apr 15  2016 /dev/stderr -> /proc/self/fd/2
## l-wx------ 1 ddelseny ddelseny 64 May  1 06:20 /proc/self/fd/2 -> pipe:[129025967]
## l-wx------ 1 ddelseny ddelseny 64 May  1 06:20 /dev/fd/2 -> pipe:[129025967]
lsof -a -p $$ -d0,1,2
## lsof: WARNING: can't stat() securityfs file system /sys/kernel/security
##       Output information may be incomplete.
## lsof: WARNING: can't stat() configfs file system /sys/kernel/config
##       Output information may be incomplete.
## COMMAND   PID     USER   FD   TYPE DEVICE SIZE/OFF      NODE NAME
## lsof    25470 ddelseny    0r   REG    8,1     3661    784274 /tmp/sh-thd-848134348 (deleted)
## lsof    25470 ddelseny    1w  FIFO    0,7      0t0 129025986 pipe
## lsof    25470 ddelseny    2w  FIFO    0,7      0t0 129025986 pipe

echo Pierre > /dev/pts/9

Redirection means reassigning one of the file descriptors to another file (or a pipe, or anything permissible). File descriptors may be reassigned locally (for a command, a command group, a subshell, a while or if or case or for loop...), or globally, for the remainder of the shell (using exec). Redirection thus makes it possible to control where the output of a command (process) goes to, and where the input of a command (process) comes from.

ps
echo $$
ls -al /proc/$$/fd
echo foo 1>/dev/null 2>/dev/null >/proc/$$/fd/255
lsof -p $$
##   PID TTY          TIME CMD
## 24368 ?        00:00:31 ccnet
## 24370 ?        00:09:23 seaf-daemon
## 25366 ?        00:00:03 R
## 25472 ?        00:00:00 sh
## 25473 ?        00:00:00 bash
## 25474 ?        00:00:00 ps
## 29231 ?        00:00:00 script-notify
## 29233 ?        00:00:00 inotifywait
## 29234 ?        00:00:21 script-notify
## 25473
## total 0
## dr-x------ 2 ddelseny root      0 May  1 06:20 .
## dr-xr-x--- 7 ddelseny root      0 May  1 06:20 ..
## lr-x------ 1 ddelseny ddelseny 64 May  1 06:20 0 -> /tmp/sh-thd-848134348 (deleted)
## l-wx------ 1 ddelseny ddelseny 64 May  1 06:20 1 -> pipe:[129026018]
## l-wx------ 1 ddelseny ddelseny 64 May  1 06:20 2 -> pipe:[129026018]
## lsof: WARNING: can't stat() securityfs file system /sys/kernel/security
##       Output information may be incomplete.
## lsof: WARNING: can't stat() configfs file system /sys/kernel/config
##       Output information may be incomplete.
## COMMAND   PID     USER   FD   TYPE DEVICE SIZE/OFF      NODE NAME
## lsof    25473 ddelseny  cwd    DIR    8,2     4096  14155777 /home/ddelseny
## lsof    25473 ddelseny  rtd    DIR    8,1     4096         2 /
## lsof    25473 ddelseny  txt    REG    8,1   163192   1053601 /usr/bin/lsof
## lsof    25473 ddelseny  mem    REG    8,1  2104880   1048786 /usr/lib/locale/locale-archive
## lsof    25473 ddelseny  mem    REG    8,1  1738176    784321 /lib/x86_64-linux-gnu/libc-2.19.so
## lsof    25473 ddelseny  mem    REG    8,1   140928    784318 /lib/x86_64-linux-gnu/ld-2.19.so
## lsof    25473 ddelseny  mem    REG    8,1    26258       858 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache
## lsof    25473 ddelseny    0r   REG    8,1     3661    784274 /tmp/sh-thd-848134348 (deleted)
## lsof    25473 ddelseny    1w  FIFO    0,7      0t0 129026018 pipe
## lsof    25473 ddelseny    2w  FIFO    0,7      0t0 129026018 pipe
## lsof    25473 ddelseny    3r   DIR    0,3        0         1 /proc
## lsof    25473 ddelseny    4r   DIR    0,3        0 129026029 /proc/25473/fd
## lsof    25473 ddelseny    5w  FIFO    0,7      0t0 129026042 pipe
## lsof    25473 ddelseny    6r  FIFO    0,7      0t0 129026043 pipe
pstree -alg 29800
lsof -p 30516

The command read waits for information from the user. This information is read in the special file /dev/stdin, which by default is associated to the terminal, and thus a keyboard entry is required.

read
read input 0< /dev/stdin
# equivalent to: read input < /dev/stdin
echo $input
grep root 0< /etc/passwd
# equivalent to: grep root < /etc/passwd
echo "Hello"
echo "Hello" 1> /dev/stdout
# equivalent to: echo "Hello" > /dev/stdout
## Hello
## Hello
echo "Hello" 1> myFile
cat myFile
echo "Good evening" 1>>myFile
cat myFile
## Hello
## Hello
## Good evening
ls --- 2> errors
cat errors
## ls: unrecognized option '---'
## Try 'ls --help' for more information.

Installation of Softwares

apt-get, dpkg,

Network:

route

Command Description
ssh OpenSSH SSH client (remote login program)
scp Secure copy (remote file copy program)
ftp Internet file transfer program
telnet User interface to the TELNET protocol
host DNS lookup utility
ping Send ICMP ECHO_REQUEST to network hosts
netstat Display various information on the network
nmap Tool to explore network and scan ports/security
nslookup Tool to query Internet name servers interactively
whois Client for the whois directory
dig DNS lookup utility

http://www.tecmint.com/keep-remote-ssh-sessions-running-after-disconnection/ http://perlstalker.vuser.org/blog/2012/10/16/emacsclient-and-tmux/

Bandit wargame

Hardware

Command Description
lsusb List USB devices
lspci List all PCI devices
lscpu Display information about the CPU architecture
lshw List all hardware components
sensors Print sensors information
lsmod Show the status of modules in the Linux Kernel
dmesg Print or control the kernel ring buffer
cat /proc/meminfo
cat /proc/cpuinfo
## MemTotal:        2001180 kB
## MemFree:          202620 kB
## MemAvailable:    1279836 kB
## Buffers:          306612 kB
## Cached:           261252 kB
## SwapCached:         2928 kB
## Active:           437076 kB
## Inactive:         595000 kB
## Active(anon):     218288 kB
## Inactive(anon):   378708 kB
## Active(file):     218788 kB
## Inactive(file):   216292 kB
## Unevictable:           0 kB
## Mlocked:               0 kB
## SwapTotal:        523260 kB
## SwapFree:         218576 kB
## Dirty:               792 kB
## Writeback:             0 kB
## AnonPages:        461916 kB
## Mapped:            88152 kB
## Shmem:            132752 kB
## Slab:             693480 kB
## SReclaimable:     663316 kB
## SUnreclaim:        30164 kB
## KernelStack:        3808 kB
## PageTables:        11268 kB
## NFS_Unstable:          0 kB
## Bounce:                0 kB
## WritebackTmp:          0 kB
## CommitLimit:     1523848 kB
## Committed_AS:    2005320 kB
## VmallocTotal:   34359738367 kB
## VmallocUsed:       16788 kB
## VmallocChunk:   34359664460 kB
## HardwareCorrupted:     0 kB
## DirectMap4k:       10688 kB
## DirectMap2M:     2048000 kB
## processor    : 0
## vendor_id    : GenuineIntel
## cpu family   : 6
## model        : 22
## model name   : Intel(R) Celeron(R) CPU          220  @ 1.20GHz
## stepping : 1
## microcode    : 0x36
## cpu MHz      : 1200.083
## cache size   : 512 KB
## physical id  : 0
## siblings : 1
## core id      : 0
## cpu cores    : 1
## apicid       : 0
## initial apicid   : 0
## fpu      : yes
## fpu_exception    : yes
## cpuid level  : 10
## wp       : yes
## flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm lahf_lm dtherm
## bogomips : 2400.16
## clflush size : 64
## cache_alignment  : 64
## address sizes    : 36 bits physical, 48 bits virtual
## power management:

Regarder dans /usr/bin et dans /usr/sbin

which

info Coreutils info textutils info shellutils info fileutils info grep inetutils diffutils findutils finger info ed screen acct a2ps xnee, gnee datamash wget units time indent dap: https://www.gnu.org/software/dap/

Moreutils:

chronic: runs a command quietly unless it fails combine: combine the lines in two files using boolean operations errno: look up errno names and descriptions ifdata: get network interface info without parsing ifconfig output isutf8: check if a file or standard input is utf-8 ifne: run a command if the standard input is not empty lckdo: execute a program with a lock held (deprecated) mispipe: pipe two commands, returning the exit status of the first parallel: run multiple jobs at once pee: tee standard input to pipes sponge: soak up standard input and write to a file ts: timestamp standard input vidir: edit a directory in your text editor vipe: insert a text editor into a pipe zrun: automatically uncompress arguments to command