Linux-cli-intro
Jump to navigation
Jump to search
The following pointers can be used to get a basic understanding of a Linux system.
Concepts:
- kernel
- debian/raspbian
- root
- shell
- filesystem (ext2)
- firmware
- apt
- mount points
- shm
- proc
- dev
- tty
- stderr/stdout
- sound
- putty/ssh
- ncurses (text based gui)
command line ------------ shutdown - shut down or reboot system passwd - change password man - man(ual) page with info date - prints date and time sudo - do as root su - substitute user ls - list files in a directory alias - shortcuts to commands ps - process information df - disk free du - disk usage cat - print contents (of a file) echo - print text (on screen) touch - create/update file/timestamp more - show output per-screen grep - filter output by keyword(s) match head - show top of (a file) tail - show bottom (of a file) sort - sort alphabetically find - search for matching files or directories cp - copy file(s) or directories mv - move file(s) or directories rm - delete file(s) pwd - print working directory cd - change directory mkdir - make directory rmdir - remove directory chown - change ownership permissions of a file or directory chgrp - change group permissions of a file or directory chmod - change access and execute permissions of a file or directory groups - show group memberships ifconfig - show network interfaces netstat - show network connections cron - execute scheduled commands crontab -e - edit user's own crontab crontab -e -u <user> - edit other user's crontab crontab -l - show contents of crontab <cmd> & - background a process nohup <cmd> - background a process independent of shell screen - background shell CTRL-PGUP - scroll screen up CTRL-PGDN - scroll screen down arrow up - previous command arrow down - next command history - show list of previous commands !<nr> - issue command nr apt (software package management) apt-get update - fetch a current list of all packages from the Internet apt-get upgrade - check for and install any packages that need updating apt-get clean - empty cache of downloaded packages apt-cache search <name> - find if a package exists apt-cache show <name> - show detailed information about a package apt-get install <name> - install a package apt-get remove <name> - remove a package apt-get remove --purge <name> - remove a package + any configuration files dpkg -l - show list of all installed packages aptitude - curses based package management rapspi-config - configure raspberry pi rpi-update - update rpi firmware startx - start x environment iptraf - monitor network activity bwm-ng - bandwidth monitor Files ----- /etc/hostname /etc/hosts /etc/debian_version /etc/fstab /etc/network/interfaces /etc/resolv.conf /etc/wpa.conf /etc/rc.local /etc/apt/sources.list /etc/default/keyboard Directories ----------- /usr/local/bin /home /boot /etc /usr /var/www /mnt /tmp /dev/shm Applications ------------ Apache - web server Samba - Windows-compatible File Server MySQL - Database Server NTP - Time server Programming ----------- Bash Python Perl C/C++ PHP Scratch (RPi) Interfacing with the Raspberry Pi GPIO -------------------------------------- Level Converter Python I2C
Further reading:
Putty, the Windows SSH client: